> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Traces



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json post /v2/projects/{project_id}/traces/search
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/projects/{project_id}/traces/search:
    post:
      tags:
        - trace
      summary: Query Traces
      operationId: query_traces_v2_projects__project_id__traces_search_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogRecordsQueryRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogRecordsQueryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - OAuth2PasswordBearer: []
        - HTTPBasic: []
components:
  schemas:
    LogRecordsQueryRequest:
      properties:
        starting_token:
          type: integer
          title: Starting Token
          default: 0
        limit:
          type: integer
          title: Limit
          default: 100
        previous_last_row_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Previous Last Row Id
        log_stream_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Log Stream Id
          description: Log stream id associated with the traces.
        experiment_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Experiment Id
          description: Experiment id associated with the traces.
        metrics_testing_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Testing Id
          description: Metrics testing id associated with the traces.
        filters:
          items:
            oneOf:
              - $ref: '#/components/schemas/LogRecordsIDFilter'
              - $ref: '#/components/schemas/LogRecordsDateFilter'
              - $ref: '#/components/schemas/LogRecordsNumberFilter'
              - $ref: '#/components/schemas/LogRecordsBooleanFilter'
              - $ref: '#/components/schemas/LogRecordsCollectionFilter'
              - $ref: '#/components/schemas/LogRecordsTextFilter'
              - $ref: '#/components/schemas/LogRecordsFullyAnnotatedFilter'
            discriminator:
              propertyName: type
              mapping:
                boolean:
                  $ref: '#/components/schemas/LogRecordsBooleanFilter'
                collection:
                  $ref: '#/components/schemas/LogRecordsCollectionFilter'
                date:
                  $ref: '#/components/schemas/LogRecordsDateFilter'
                fully_annotated:
                  $ref: '#/components/schemas/LogRecordsFullyAnnotatedFilter'
                id:
                  $ref: '#/components/schemas/LogRecordsIDFilter'
                number:
                  $ref: '#/components/schemas/LogRecordsNumberFilter'
                text:
                  $ref: '#/components/schemas/LogRecordsTextFilter'
          type: array
          title: Filters
        filter_tree:
          anyOf:
            - $ref: >-
                #/components/schemas/FilterExpression_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
            - type: 'null'
        sort:
          anyOf:
            - $ref: '#/components/schemas/LogRecordsSortClause'
            - type: 'null'
          description: >-
            Sort for the query.  Defaults to native sort (created_at, id
            descending).
        truncate_fields:
          type: boolean
          title: Truncate Fields
          default: false
        include_counts:
          type: boolean
          title: Include Counts
          description: >-
            If True, include computed child counts (e.g., num_traces for
            sessions, num_spans for traces).
          default: false
        include_code_metric_metadata:
          type: boolean
          title: Include Code Metric Metadata
          description: >-
            If True, include per-row scorer metadata (the dict returned
            alongside the score by code-based scorers via the (score, metadata)
            tuple-return contract) on each MetricSuccess in the response. Off by
            default to keep payloads small for callers that don't need it.
          default: false
      type: object
      title: LogRecordsQueryRequest
      examples:
        - filters:
            - case_sensitive: true
              name: input
              operator: eq
              type: text
              value: example input
          log_stream_id: 00000000-0000-0000-0000-000000000000
          pagination:
            limit: 5
            starting_token: 0
          sort:
            ascending: false
            name: updated_at
            sort_type: column
        - filter_tree:
            and:
              - or:
                  - filter:
                      name: input
                      operator: contains
                      type: text
                      value: abx
                  - filter:
                      name: output
                      operator: contains
                      type: text
                      value: xyz
              - filter:
                  name: session_id
                  operator: eq
                  type: id
                  value: 123e4567-e89b-42d3-a456-426614174000
          log_stream_id: 00000000-0000-0000-0000-000000000000
          pagination:
            limit: 5
            starting_token: 0
          sort:
            ascending: false
            name: updated_at
            sort_type: column
    LogRecordsQueryResponse:
      properties:
        starting_token:
          type: integer
          title: Starting Token
          default: 0
        limit:
          type: integer
          title: Limit
          default: 100
        paginated:
          type: boolean
          title: Paginated
          default: false
        next_starting_token:
          anyOf:
            - type: integer
            - type: 'null'
          title: Next Starting Token
        last_row_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Last Row Id
        records:
          items:
            oneOf:
              - $ref: '#/components/schemas/ExtendedTraceRecord'
              - $ref: '#/components/schemas/ExtendedAgentSpanRecord'
              - $ref: '#/components/schemas/ExtendedWorkflowSpanRecord'
              - $ref: '#/components/schemas/ExtendedLlmSpanRecord'
              - $ref: '#/components/schemas/ExtendedToolSpanRecord'
              - $ref: '#/components/schemas/ExtendedRetrieverSpanRecord'
              - $ref: '#/components/schemas/ExtendedControlSpanRecord'
              - $ref: '#/components/schemas/ExtendedSessionRecord'
            discriminator:
              propertyName: type
              mapping:
                agent:
                  $ref: '#/components/schemas/ExtendedAgentSpanRecord'
                control:
                  $ref: '#/components/schemas/ExtendedControlSpanRecord'
                llm:
                  $ref: '#/components/schemas/ExtendedLlmSpanRecord'
                retriever:
                  $ref: '#/components/schemas/ExtendedRetrieverSpanRecord'
                session:
                  $ref: '#/components/schemas/ExtendedSessionRecord'
                tool:
                  $ref: '#/components/schemas/ExtendedToolSpanRecord'
                trace:
                  $ref: '#/components/schemas/ExtendedTraceRecord'
                workflow:
                  $ref: '#/components/schemas/ExtendedWorkflowSpanRecord'
          type: array
          title: Records
          description: records matching the query
        num_records:
          type: integer
          title: Num Records
          description: number of records
          readOnly: true
      type: object
      required:
        - num_records
      title: LogRecordsQueryResponse
      examples:
        - next_starting_token: 2
          num_rows: 2
          paginated: true
          records:
            - annotation_aggregates: {}
              annotation_agreement: {}
              annotation_queue_ids: []
              annotations: {}
              created_at: '2026-05-12T23:58:05.834700Z'
              dataset_metadata: {}
              feedback_rating_info: {}
              file_ids: []
              file_modalities: []
              id: 1a0939d1-8b43-4fe3-a91c-196e2d9847e3
              input: Who is a smart LLM?
              is_complete: true
              metrics:
                duration_ns: 4
              name: ''
              output: I am
              project_id: 0d4e3799-3861-4759-875f-9ae14c167b0a
              run_id: 74aec44e-ec21-4c9f-a3e2-b2ab2b81b4db
              session_id: 1a0939d1-8b43-4fe3-a91c-196e2d9847e3
              tags: []
              trace_id: 1a0939d1-8b43-4fe3-a91c-196e2d9847e3
              type: trace
              user_metadata: {}
            - annotation_aggregates: {}
              annotation_agreement: {}
              annotation_queue_ids: []
              annotations: {}
              created_at: '2026-05-12T23:58:05.834853Z'
              dataset_metadata: {}
              feedback_rating_info: {}
              file_ids: []
              file_modalities: []
              id: 1edc2401-24b4-448c-a392-b36932293061
              input:
                - content: Who is a smart LLM?
                  role: user
              is_complete: true
              metrics:
                duration_ns: 4
                num_input_tokens: 4
                num_output_tokens: 2
                num_total_tokens: 6
              name: ''
              output:
                content: I am
                role: user
              parent_id: 1a0939d1-8b43-4fe3-a91c-196e2d9847e3
              project_id: 0d4e3799-3861-4759-875f-9ae14c167b0a
              run_id: 74aec44e-ec21-4c9f-a3e2-b2ab2b81b4db
              session_id: 1a0939d1-8b43-4fe3-a91c-196e2d9847e3
              tags: []
              trace_id: 1a0939d1-8b43-4fe3-a91c-196e2d9847e3
              type: llm
              user_metadata: {}
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LogRecordsIDFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - one_of
            - not_in
            - contains
          title: Operator
          default: eq
        value:
          anyOf:
            - type: string
              format: uuid4
            - items:
                anyOf:
                  - type: string
                    format: uuid4
                  - type: string
              type: array
            - type: string
          title: Value
        type:
          type: string
          const: id
          title: Type
          default: id
      type: object
      required:
        - column_id
        - value
      title: LogRecordsIDFilter
    LogRecordsDateFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
          title: Operator
        value:
          type: string
          format: date-time
          title: Value
        type:
          type: string
          const: date
          title: Type
          default: date
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsDateFilter
    LogRecordsNumberFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - between
          title: Operator
        value:
          anyOf:
            - type: integer
            - type: number
            - items:
                type: integer
              type: array
            - items:
                type: number
              type: array
          title: Value
        type:
          type: string
          const: number
          title: Type
          default: number
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsNumberFilter
    LogRecordsBooleanFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
          title: Operator
          default: eq
        value:
          type: boolean
          title: Value
        type:
          type: string
          const: boolean
          title: Type
          default: boolean
      type: object
      required:
        - column_id
        - value
      title: LogRecordsBooleanFilter
    LogRecordsCollectionFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - contains
            - one_of
            - not_in
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
        case_sensitive:
          type: boolean
          title: Case Sensitive
          default: true
        type:
          type: string
          const: collection
          title: Type
          default: collection
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsCollectionFilter
    LogRecordsTextFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - contains
            - one_of
            - not_in
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
        case_sensitive:
          type: boolean
          title: Case Sensitive
          default: true
        type:
          type: string
          const: text
          title: Type
          default: text
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsTextFilter
    LogRecordsFullyAnnotatedFilter:
      properties:
        column_id:
          type: string
          const: fully_annotated
          title: Column Id
          description: >-
            Queue-scoped filter identifier. This filter only works for
            annotation-queue searches that provide queue context.
          default: fully_annotated
        type:
          type: string
          const: fully_annotated
          title: Type
          default: fully_annotated
        user_ids:
          anyOf:
            - items:
                type: string
                format: uuid4
              type: array
              minItems: 1
            - type: 'null'
          title: User Ids
          description: >-
            Optional queue member IDs to require for full annotation in a
            queue-scoped search. If omitted, all tracked queue members visible
            to the requester are used.
      type: object
      title: LogRecordsFullyAnnotatedFilter
      description: Queue-scoped filter for records rated across all queue templates.
    FilterExpression_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input:
      anyOf:
        - $ref: >-
            #/components/schemas/FilterLeaf_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____
        - $ref: >-
            #/components/schemas/AndNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
        - $ref: >-
            #/components/schemas/OrNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
        - $ref: >-
            #/components/schemas/NotNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
    LogRecordsSortClause:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to sort.
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      required:
        - column_id
      title: LogRecordsSortClause
    ExtendedTraceRecord:
      properties:
        type:
          type: string
          const: trace
          title: Type
          description: Type of the trace, span or session.
          default: trace
        input:
          anyOf:
            - type: string
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
          title: Input
          description: Input to the trace or span.
          default: ''
        redacted_input:
          anyOf:
            - type: string
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - type: 'null'
          title: Redacted Input
          description: Redacted input of the trace or span.
        output:
          anyOf:
            - type: string
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - type: 'null'
          title: Output
          description: Output of the trace or span.
        redacted_output:
          anyOf:
            - type: string
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - type: 'null'
          title: Redacted Output
          description: Redacted output of the trace or span.
        name:
          type: string
          title: Name
          description: Name of the trace, span or session.
          default: ''
        created_at:
          type: string
          format: date-time
          title: Created
          description: Timestamp of the trace or span's creation.
        user_metadata:
          additionalProperties:
            type: string
          type: object
          title: User Metadata
          description: Metadata associated with this trace or span.
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Tags associated with this trace or span.
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status Code
          description: >-
            Status code of the trace or span. Used for logging failure or error
            states.
        metrics:
          $ref: '#/components/schemas/Metrics'
          description: Metrics associated with this trace or span.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: A user-provided session, trace or span ID.
        dataset_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Input
          description: Input to the dataset associated with this trace
        dataset_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Output
          description: Output from the dataset associated with this trace
        dataset_metadata:
          additionalProperties:
            type: string
          type: object
          title: Dataset Metadata
          description: Metadata from the dataset associated with this trace
        id:
          type: string
          format: uuid4
          title: ID
          description: Galileo ID of the trace
        session_id:
          type: string
          format: uuid4
          title: Session ID
          description: >-
            Galileo ID of the session containing the trace (or the same value as
            id for a trace)
        trace_id:
          type: string
          format: uuid4
          title: Trace ID
          description: >-
            Galileo ID of the trace containing the span (or the same value as id
            for a trace)
        project_id:
          type: string
          format: uuid4
          title: Project ID
          description: Galileo ID of the project associated with this trace or span
        run_id:
          type: string
          format: uuid4
          title: Run ID
          description: >-
            Galileo ID of the run (log stream or experiment) associated with
            this trace or span
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated
          description: Timestamp of the session or trace or span's last update
        has_children:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Children
          description: Whether or not this trace or span has child spans
        metrics_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        session_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Session Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        feedback_rating_info:
          additionalProperties:
            $ref: '#/components/schemas/FeedbackRatingInfo'
          type: object
          title: Feedback Rating Info
          description: Feedback information related to the record
        annotations:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/AnnotationRatingInfo'
            propertyNames:
              format: uuid4
            type: object
          propertyNames:
            format: uuid4
          type: object
          title: Annotations
          description: Annotations keyed by template ID and annotator ID
        file_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: File Ids
          description: IDs of files associated with this record
        file_modalities:
          items:
            $ref: '#/components/schemas/ContentModality'
          type: array
          title: File Modalities
          description: Modalities of files associated with this record
        annotation_aggregates:
          additionalProperties:
            $ref: '#/components/schemas/AnnotationAggregate'
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Aggregates
          description: Annotation aggregate information keyed by template ID
        annotation_agreement:
          additionalProperties:
            type: number
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Agreement
          description: Annotation agreement scores keyed by template ID
        overall_annotation_agreement:
          anyOf:
            - type: number
            - type: 'null'
          title: Overall Annotation Agreement
          description: Average annotation agreement across all templates in the queue
        annotation_queue_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: Annotation Queue Ids
          description: IDs of annotation queues this record is in
        fully_annotated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Fully Annotated
          description: Whether every field is annotated by every annotator in the queue
        metric_info:
          anyOf:
            - additionalProperties:
                oneOf:
                  - $ref: '#/components/schemas/MetricNotComputed'
                  - $ref: '#/components/schemas/MetricPending'
                  - $ref: '#/components/schemas/MetricComputing'
                  - $ref: '#/components/schemas/MetricNotApplicable'
                  - $ref: '#/components/schemas/MetricSuccess'
                  - $ref: '#/components/schemas/MetricError'
                  - $ref: '#/components/schemas/MetricFailed'
                  - $ref: '#/components/schemas/MetricRollUp'
                discriminator:
                  propertyName: status_type
                  mapping:
                    computing:
                      $ref: '#/components/schemas/MetricComputing'
                    error:
                      $ref: '#/components/schemas/MetricError'
                    failed:
                      $ref: '#/components/schemas/MetricFailed'
                    not_applicable:
                      $ref: '#/components/schemas/MetricNotApplicable'
                    not_computed:
                      $ref: '#/components/schemas/MetricNotComputed'
                    pending:
                      $ref: '#/components/schemas/MetricPending'
                    roll_up:
                      $ref: '#/components/schemas/MetricRollUp'
                    success:
                      $ref: '#/components/schemas/MetricSuccess'
              type: object
            - type: 'null'
          title: Metric Info
          description: >-
            Detailed information about the metrics associated with this trace or
            span
        files:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/FileMetadata'
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Files
          description: File metadata keyed by file ID for files associated with this record
        is_complete:
          type: boolean
          title: Is Complete
          description: Whether the trace is complete or not
          default: true
        num_spans:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Spans
      type: object
      required:
        - id
        - session_id
        - trace_id
        - project_id
        - run_id
      title: ExtendedTraceRecord
    ExtendedAgentSpanRecord:
      properties:
        type:
          type: string
          const: agent
          title: Type
          description: Type of the trace, span or session.
          default: agent
        input:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
          title: Input
          description: Input to the trace or span.
          default: ''
        redacted_input:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - type: 'null'
          title: Redacted Input
          description: Redacted input of the trace or span.
        output:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Message'
            - items:
                $ref: '#/components/schemas/Document-Output'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - $ref: '#/components/schemas/ControlResult'
            - type: 'null'
          title: Output
          description: Output of the trace or span.
        redacted_output:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Message'
            - items:
                $ref: '#/components/schemas/Document-Output'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - $ref: '#/components/schemas/ControlResult'
            - type: 'null'
          title: Redacted Output
          description: Redacted output of the trace or span.
        name:
          type: string
          title: Name
          description: Name of the trace, span or session.
          default: ''
        created_at:
          type: string
          format: date-time
          title: Created
          description: Timestamp of the trace or span's creation.
        user_metadata:
          additionalProperties:
            type: string
          type: object
          title: User Metadata
          description: Metadata associated with this trace or span.
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Tags associated with this trace or span.
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status Code
          description: >-
            Status code of the trace or span. Used for logging failure or error
            states.
        metrics:
          $ref: '#/components/schemas/Metrics'
          description: Metrics associated with this trace or span.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: A user-provided session, trace or span ID.
        dataset_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Input
          description: Input to the dataset associated with this trace
        dataset_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Output
          description: Output from the dataset associated with this trace
        dataset_metadata:
          additionalProperties:
            type: string
          type: object
          title: Dataset Metadata
          description: Metadata from the dataset associated with this trace
        id:
          type: string
          format: uuid4
          title: ID
          description: Galileo ID of the session, trace or span
        session_id:
          type: string
          format: uuid4
          title: Session ID
          description: >-
            Galileo ID of the session containing the trace (or the same value as
            id for a trace)
        trace_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Trace ID
          description: >-
            Galileo ID of the trace containing the span (or the same value as id
            for a trace)
        project_id:
          type: string
          format: uuid4
          title: Project ID
          description: Galileo ID of the project associated with this trace or span
        run_id:
          type: string
          format: uuid4
          title: Run ID
          description: >-
            Galileo ID of the run (log stream or experiment) associated with
            this trace or span
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated
          description: Timestamp of the session or trace or span's last update
        has_children:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Children
          description: Whether or not this trace or span has child spans
        metrics_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        session_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Session Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        feedback_rating_info:
          additionalProperties:
            $ref: '#/components/schemas/FeedbackRatingInfo'
          type: object
          title: Feedback Rating Info
          description: Feedback information related to the record
        annotations:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/AnnotationRatingInfo'
            propertyNames:
              format: uuid4
            type: object
          propertyNames:
            format: uuid4
          type: object
          title: Annotations
          description: Annotations keyed by template ID and annotator ID
        file_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: File Ids
          description: IDs of files associated with this record
        file_modalities:
          items:
            $ref: '#/components/schemas/ContentModality'
          type: array
          title: File Modalities
          description: Modalities of files associated with this record
        annotation_aggregates:
          additionalProperties:
            $ref: '#/components/schemas/AnnotationAggregate'
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Aggregates
          description: Annotation aggregate information keyed by template ID
        annotation_agreement:
          additionalProperties:
            type: number
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Agreement
          description: Annotation agreement scores keyed by template ID
        overall_annotation_agreement:
          anyOf:
            - type: number
            - type: 'null'
          title: Overall Annotation Agreement
          description: Average annotation agreement across all templates in the queue
        annotation_queue_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: Annotation Queue Ids
          description: IDs of annotation queues this record is in
        fully_annotated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Fully Annotated
          description: Whether every field is annotated by every annotator in the queue
        metric_info:
          anyOf:
            - additionalProperties:
                oneOf:
                  - $ref: '#/components/schemas/MetricNotComputed'
                  - $ref: '#/components/schemas/MetricPending'
                  - $ref: '#/components/schemas/MetricComputing'
                  - $ref: '#/components/schemas/MetricNotApplicable'
                  - $ref: '#/components/schemas/MetricSuccess'
                  - $ref: '#/components/schemas/MetricError'
                  - $ref: '#/components/schemas/MetricFailed'
                  - $ref: '#/components/schemas/MetricRollUp'
                discriminator:
                  propertyName: status_type
                  mapping:
                    computing:
                      $ref: '#/components/schemas/MetricComputing'
                    error:
                      $ref: '#/components/schemas/MetricError'
                    failed:
                      $ref: '#/components/schemas/MetricFailed'
                    not_applicable:
                      $ref: '#/components/schemas/MetricNotApplicable'
                    not_computed:
                      $ref: '#/components/schemas/MetricNotComputed'
                    pending:
                      $ref: '#/components/schemas/MetricPending'
                    roll_up:
                      $ref: '#/components/schemas/MetricRollUp'
                    success:
                      $ref: '#/components/schemas/MetricSuccess'
              type: object
            - type: 'null'
          title: Metric Info
          description: >-
            Detailed information about the metrics associated with this trace or
            span
        files:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/FileMetadata'
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Files
          description: File metadata keyed by file ID for files associated with this record
        parent_id:
          type: string
          format: uuid4
          title: Parent ID
          description: Galileo ID of the parent of this span
        is_complete:
          type: boolean
          title: Is Complete
          description: Whether the parent trace is complete or not
          default: true
        step_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Step Number
          description: Topological step number of the span.
        agent_type:
          $ref: '#/components/schemas/AgentType'
          description: Agent type.
          default: default
      type: object
      required:
        - id
        - session_id
        - project_id
        - run_id
        - parent_id
      title: ExtendedAgentSpanRecord
    ExtendedWorkflowSpanRecord:
      properties:
        type:
          type: string
          const: workflow
          title: Type
          description: Type of the trace, span or session.
          default: workflow
        input:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
          title: Input
          description: Input to the trace or span.
          default: ''
        redacted_input:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - type: 'null'
          title: Redacted Input
          description: Redacted input of the trace or span.
        output:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Message'
            - items:
                $ref: '#/components/schemas/Document-Output'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - $ref: '#/components/schemas/ControlResult'
            - type: 'null'
          title: Output
          description: Output of the trace or span.
        redacted_output:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Message'
            - items:
                $ref: '#/components/schemas/Document-Output'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - $ref: '#/components/schemas/ControlResult'
            - type: 'null'
          title: Redacted Output
          description: Redacted output of the trace or span.
        name:
          type: string
          title: Name
          description: Name of the trace, span or session.
          default: ''
        created_at:
          type: string
          format: date-time
          title: Created
          description: Timestamp of the trace or span's creation.
        user_metadata:
          additionalProperties:
            type: string
          type: object
          title: User Metadata
          description: Metadata associated with this trace or span.
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Tags associated with this trace or span.
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status Code
          description: >-
            Status code of the trace or span. Used for logging failure or error
            states.
        metrics:
          $ref: '#/components/schemas/Metrics'
          description: Metrics associated with this trace or span.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: A user-provided session, trace or span ID.
        dataset_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Input
          description: Input to the dataset associated with this trace
        dataset_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Output
          description: Output from the dataset associated with this trace
        dataset_metadata:
          additionalProperties:
            type: string
          type: object
          title: Dataset Metadata
          description: Metadata from the dataset associated with this trace
        id:
          type: string
          format: uuid4
          title: ID
          description: Galileo ID of the session, trace or span
        session_id:
          type: string
          format: uuid4
          title: Session ID
          description: >-
            Galileo ID of the session containing the trace (or the same value as
            id for a trace)
        trace_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Trace ID
          description: >-
            Galileo ID of the trace containing the span (or the same value as id
            for a trace)
        project_id:
          type: string
          format: uuid4
          title: Project ID
          description: Galileo ID of the project associated with this trace or span
        run_id:
          type: string
          format: uuid4
          title: Run ID
          description: >-
            Galileo ID of the run (log stream or experiment) associated with
            this trace or span
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated
          description: Timestamp of the session or trace or span's last update
        has_children:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Children
          description: Whether or not this trace or span has child spans
        metrics_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        session_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Session Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        feedback_rating_info:
          additionalProperties:
            $ref: '#/components/schemas/FeedbackRatingInfo'
          type: object
          title: Feedback Rating Info
          description: Feedback information related to the record
        annotations:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/AnnotationRatingInfo'
            propertyNames:
              format: uuid4
            type: object
          propertyNames:
            format: uuid4
          type: object
          title: Annotations
          description: Annotations keyed by template ID and annotator ID
        file_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: File Ids
          description: IDs of files associated with this record
        file_modalities:
          items:
            $ref: '#/components/schemas/ContentModality'
          type: array
          title: File Modalities
          description: Modalities of files associated with this record
        annotation_aggregates:
          additionalProperties:
            $ref: '#/components/schemas/AnnotationAggregate'
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Aggregates
          description: Annotation aggregate information keyed by template ID
        annotation_agreement:
          additionalProperties:
            type: number
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Agreement
          description: Annotation agreement scores keyed by template ID
        overall_annotation_agreement:
          anyOf:
            - type: number
            - type: 'null'
          title: Overall Annotation Agreement
          description: Average annotation agreement across all templates in the queue
        annotation_queue_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: Annotation Queue Ids
          description: IDs of annotation queues this record is in
        fully_annotated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Fully Annotated
          description: Whether every field is annotated by every annotator in the queue
        metric_info:
          anyOf:
            - additionalProperties:
                oneOf:
                  - $ref: '#/components/schemas/MetricNotComputed'
                  - $ref: '#/components/schemas/MetricPending'
                  - $ref: '#/components/schemas/MetricComputing'
                  - $ref: '#/components/schemas/MetricNotApplicable'
                  - $ref: '#/components/schemas/MetricSuccess'
                  - $ref: '#/components/schemas/MetricError'
                  - $ref: '#/components/schemas/MetricFailed'
                  - $ref: '#/components/schemas/MetricRollUp'
                discriminator:
                  propertyName: status_type
                  mapping:
                    computing:
                      $ref: '#/components/schemas/MetricComputing'
                    error:
                      $ref: '#/components/schemas/MetricError'
                    failed:
                      $ref: '#/components/schemas/MetricFailed'
                    not_applicable:
                      $ref: '#/components/schemas/MetricNotApplicable'
                    not_computed:
                      $ref: '#/components/schemas/MetricNotComputed'
                    pending:
                      $ref: '#/components/schemas/MetricPending'
                    roll_up:
                      $ref: '#/components/schemas/MetricRollUp'
                    success:
                      $ref: '#/components/schemas/MetricSuccess'
              type: object
            - type: 'null'
          title: Metric Info
          description: >-
            Detailed information about the metrics associated with this trace or
            span
        files:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/FileMetadata'
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Files
          description: File metadata keyed by file ID for files associated with this record
        parent_id:
          type: string
          format: uuid4
          title: Parent ID
          description: Galileo ID of the parent of this span
        is_complete:
          type: boolean
          title: Is Complete
          description: Whether the parent trace is complete or not
          default: true
        step_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Step Number
          description: Topological step number of the span.
      type: object
      required:
        - id
        - session_id
        - project_id
        - run_id
        - parent_id
      title: ExtendedWorkflowSpanRecord
    ExtendedLlmSpanRecord:
      properties:
        type:
          type: string
          const: llm
          title: Type
          description: Type of the trace, span or session.
          default: llm
        input:
          items:
            $ref: '#/components/schemas/Message'
          type: array
          title: Input
          description: Input to the trace or span.
        redacted_input:
          anyOf:
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - type: 'null'
          title: Redacted Input
          description: Redacted input of the trace or span.
        output:
          $ref: '#/components/schemas/Message'
          description: Output of the trace or span.
        redacted_output:
          anyOf:
            - $ref: '#/components/schemas/Message'
            - type: 'null'
          description: Redacted output of the trace or span.
        name:
          type: string
          title: Name
          description: Name of the trace, span or session.
          default: ''
        created_at:
          type: string
          format: date-time
          title: Created
          description: Timestamp of the trace or span's creation.
        user_metadata:
          additionalProperties:
            type: string
          type: object
          title: User Metadata
          description: Metadata associated with this trace or span.
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Tags associated with this trace or span.
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status Code
          description: >-
            Status code of the trace or span. Used for logging failure or error
            states.
        metrics:
          $ref: '#/components/schemas/LlmMetrics'
          description: Metrics associated with this trace or span.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: A user-provided session, trace or span ID.
        dataset_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Input
          description: Input to the dataset associated with this trace
        dataset_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Output
          description: Output from the dataset associated with this trace
        dataset_metadata:
          additionalProperties:
            type: string
          type: object
          title: Dataset Metadata
          description: Metadata from the dataset associated with this trace
        id:
          type: string
          format: uuid4
          title: ID
          description: Galileo ID of the session, trace or span
        session_id:
          type: string
          format: uuid4
          title: Session ID
          description: >-
            Galileo ID of the session containing the trace (or the same value as
            id for a trace)
        trace_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Trace ID
          description: >-
            Galileo ID of the trace containing the span (or the same value as id
            for a trace)
        project_id:
          type: string
          format: uuid4
          title: Project ID
          description: Galileo ID of the project associated with this trace or span
        run_id:
          type: string
          format: uuid4
          title: Run ID
          description: >-
            Galileo ID of the run (log stream or experiment) associated with
            this trace or span
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated
          description: Timestamp of the session or trace or span's last update
        has_children:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Children
          description: Whether or not this trace or span has child spans
        metrics_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        session_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Session Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        feedback_rating_info:
          additionalProperties:
            $ref: '#/components/schemas/FeedbackRatingInfo'
          type: object
          title: Feedback Rating Info
          description: Feedback information related to the record
        annotations:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/AnnotationRatingInfo'
            propertyNames:
              format: uuid4
            type: object
          propertyNames:
            format: uuid4
          type: object
          title: Annotations
          description: Annotations keyed by template ID and annotator ID
        file_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: File Ids
          description: IDs of files associated with this record
        file_modalities:
          items:
            $ref: '#/components/schemas/ContentModality'
          type: array
          title: File Modalities
          description: Modalities of files associated with this record
        annotation_aggregates:
          additionalProperties:
            $ref: '#/components/schemas/AnnotationAggregate'
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Aggregates
          description: Annotation aggregate information keyed by template ID
        annotation_agreement:
          additionalProperties:
            type: number
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Agreement
          description: Annotation agreement scores keyed by template ID
        overall_annotation_agreement:
          anyOf:
            - type: number
            - type: 'null'
          title: Overall Annotation Agreement
          description: Average annotation agreement across all templates in the queue
        annotation_queue_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: Annotation Queue Ids
          description: IDs of annotation queues this record is in
        fully_annotated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Fully Annotated
          description: Whether every field is annotated by every annotator in the queue
        metric_info:
          anyOf:
            - additionalProperties:
                oneOf:
                  - $ref: '#/components/schemas/MetricNotComputed'
                  - $ref: '#/components/schemas/MetricPending'
                  - $ref: '#/components/schemas/MetricComputing'
                  - $ref: '#/components/schemas/MetricNotApplicable'
                  - $ref: '#/components/schemas/MetricSuccess'
                  - $ref: '#/components/schemas/MetricError'
                  - $ref: '#/components/schemas/MetricFailed'
                  - $ref: '#/components/schemas/MetricRollUp'
                discriminator:
                  propertyName: status_type
                  mapping:
                    computing:
                      $ref: '#/components/schemas/MetricComputing'
                    error:
                      $ref: '#/components/schemas/MetricError'
                    failed:
                      $ref: '#/components/schemas/MetricFailed'
                    not_applicable:
                      $ref: '#/components/schemas/MetricNotApplicable'
                    not_computed:
                      $ref: '#/components/schemas/MetricNotComputed'
                    pending:
                      $ref: '#/components/schemas/MetricPending'
                    roll_up:
                      $ref: '#/components/schemas/MetricRollUp'
                    success:
                      $ref: '#/components/schemas/MetricSuccess'
              type: object
            - type: 'null'
          title: Metric Info
          description: >-
            Detailed information about the metrics associated with this trace or
            span
        files:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/FileMetadata'
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Files
          description: File metadata keyed by file ID for files associated with this record
        parent_id:
          type: string
          format: uuid4
          title: Parent ID
          description: Galileo ID of the parent of this span
        is_complete:
          type: boolean
          title: Is Complete
          description: Whether the parent trace is complete or not
          default: true
        step_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Step Number
          description: Topological step number of the span.
        tools:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Tools
          description: List of available tools passed to the LLM on invocation.
        events:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/MessageEvent'
                  - $ref: '#/components/schemas/ReasoningEvent'
                  - $ref: '#/components/schemas/InternalToolCall'
                  - $ref: '#/components/schemas/WebSearchCallEvent'
                  - $ref: '#/components/schemas/ImageGenerationEvent'
                  - $ref: '#/components/schemas/MCPCallEvent'
                  - $ref: '#/components/schemas/MCPListToolsEvent'
                  - $ref: '#/components/schemas/MCPApprovalRequestEvent'
                discriminator:
                  propertyName: type
                  mapping:
                    image_generation:
                      $ref: '#/components/schemas/ImageGenerationEvent'
                    internal_tool_call:
                      $ref: '#/components/schemas/InternalToolCall'
                    mcp_approval_request:
                      $ref: '#/components/schemas/MCPApprovalRequestEvent'
                    mcp_call:
                      $ref: '#/components/schemas/MCPCallEvent'
                    mcp_list_tools:
                      $ref: '#/components/schemas/MCPListToolsEvent'
                    message:
                      $ref: '#/components/schemas/MessageEvent'
                    reasoning:
                      $ref: '#/components/schemas/ReasoningEvent'
                    web_search_call:
                      $ref: '#/components/schemas/WebSearchCallEvent'
              type: array
            - type: 'null'
          title: Events
          description: >-
            List of reasoning, internal tool call, or MCP events that occurred
            during the LLM span.
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: Model used for this span.
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Temperature
          description: Temperature used for generation.
        finish_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Finish Reason
          description: Reason for finishing.
      type: object
      required:
        - id
        - session_id
        - project_id
        - run_id
        - parent_id
      title: ExtendedLlmSpanRecord
    ExtendedToolSpanRecord:
      properties:
        type:
          type: string
          const: tool
          title: Type
          description: Type of the trace, span or session.
          default: tool
        input:
          type: string
          title: Input
          description: Input to the trace or span.
          default: ''
        redacted_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Redacted Input
          description: Redacted input of the trace or span.
        output:
          anyOf:
            - type: string
            - type: 'null'
          title: Output
          description: Output of the trace or span.
        redacted_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Redacted Output
          description: Redacted output of the trace or span.
        name:
          type: string
          title: Name
          description: Name of the trace, span or session.
          default: ''
        created_at:
          type: string
          format: date-time
          title: Created
          description: Timestamp of the trace or span's creation.
        user_metadata:
          additionalProperties:
            type: string
          type: object
          title: User Metadata
          description: Metadata associated with this trace or span.
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Tags associated with this trace or span.
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status Code
          description: >-
            Status code of the trace or span. Used for logging failure or error
            states.
        metrics:
          $ref: '#/components/schemas/Metrics'
          description: Metrics associated with this trace or span.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: A user-provided session, trace or span ID.
        dataset_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Input
          description: Input to the dataset associated with this trace
        dataset_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Output
          description: Output from the dataset associated with this trace
        dataset_metadata:
          additionalProperties:
            type: string
          type: object
          title: Dataset Metadata
          description: Metadata from the dataset associated with this trace
        id:
          type: string
          format: uuid4
          title: ID
          description: Galileo ID of the session, trace or span
        session_id:
          type: string
          format: uuid4
          title: Session ID
          description: >-
            Galileo ID of the session containing the trace (or the same value as
            id for a trace)
        trace_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Trace ID
          description: >-
            Galileo ID of the trace containing the span (or the same value as id
            for a trace)
        project_id:
          type: string
          format: uuid4
          title: Project ID
          description: Galileo ID of the project associated with this trace or span
        run_id:
          type: string
          format: uuid4
          title: Run ID
          description: >-
            Galileo ID of the run (log stream or experiment) associated with
            this trace or span
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated
          description: Timestamp of the session or trace or span's last update
        has_children:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Children
          description: Whether or not this trace or span has child spans
        metrics_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        session_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Session Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        feedback_rating_info:
          additionalProperties:
            $ref: '#/components/schemas/FeedbackRatingInfo'
          type: object
          title: Feedback Rating Info
          description: Feedback information related to the record
        annotations:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/AnnotationRatingInfo'
            propertyNames:
              format: uuid4
            type: object
          propertyNames:
            format: uuid4
          type: object
          title: Annotations
          description: Annotations keyed by template ID and annotator ID
        file_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: File Ids
          description: IDs of files associated with this record
        file_modalities:
          items:
            $ref: '#/components/schemas/ContentModality'
          type: array
          title: File Modalities
          description: Modalities of files associated with this record
        annotation_aggregates:
          additionalProperties:
            $ref: '#/components/schemas/AnnotationAggregate'
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Aggregates
          description: Annotation aggregate information keyed by template ID
        annotation_agreement:
          additionalProperties:
            type: number
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Agreement
          description: Annotation agreement scores keyed by template ID
        overall_annotation_agreement:
          anyOf:
            - type: number
            - type: 'null'
          title: Overall Annotation Agreement
          description: Average annotation agreement across all templates in the queue
        annotation_queue_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: Annotation Queue Ids
          description: IDs of annotation queues this record is in
        fully_annotated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Fully Annotated
          description: Whether every field is annotated by every annotator in the queue
        metric_info:
          anyOf:
            - additionalProperties:
                oneOf:
                  - $ref: '#/components/schemas/MetricNotComputed'
                  - $ref: '#/components/schemas/MetricPending'
                  - $ref: '#/components/schemas/MetricComputing'
                  - $ref: '#/components/schemas/MetricNotApplicable'
                  - $ref: '#/components/schemas/MetricSuccess'
                  - $ref: '#/components/schemas/MetricError'
                  - $ref: '#/components/schemas/MetricFailed'
                  - $ref: '#/components/schemas/MetricRollUp'
                discriminator:
                  propertyName: status_type
                  mapping:
                    computing:
                      $ref: '#/components/schemas/MetricComputing'
                    error:
                      $ref: '#/components/schemas/MetricError'
                    failed:
                      $ref: '#/components/schemas/MetricFailed'
                    not_applicable:
                      $ref: '#/components/schemas/MetricNotApplicable'
                    not_computed:
                      $ref: '#/components/schemas/MetricNotComputed'
                    pending:
                      $ref: '#/components/schemas/MetricPending'
                    roll_up:
                      $ref: '#/components/schemas/MetricRollUp'
                    success:
                      $ref: '#/components/schemas/MetricSuccess'
              type: object
            - type: 'null'
          title: Metric Info
          description: >-
            Detailed information about the metrics associated with this trace or
            span
        files:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/FileMetadata'
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Files
          description: File metadata keyed by file ID for files associated with this record
        parent_id:
          type: string
          format: uuid4
          title: Parent ID
          description: Galileo ID of the parent of this span
        is_complete:
          type: boolean
          title: Is Complete
          description: Whether the parent trace is complete or not
          default: true
        step_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Step Number
          description: Topological step number of the span.
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Id
          description: ID of the tool call.
      type: object
      required:
        - id
        - session_id
        - project_id
        - run_id
        - parent_id
      title: ExtendedToolSpanRecord
    ExtendedRetrieverSpanRecord:
      properties:
        type:
          type: string
          const: retriever
          title: Type
          description: Type of the trace, span or session.
          default: retriever
        input:
          type: string
          title: Input
          description: Input to the trace or span.
          default: ''
        redacted_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Redacted Input
          description: Redacted input of the trace or span.
        output:
          items:
            $ref: '#/components/schemas/Document-Output'
          type: array
          title: Output
          description: Output of the trace or span.
        redacted_output:
          anyOf:
            - items:
                $ref: '#/components/schemas/Document-Output'
              type: array
            - type: 'null'
          title: Redacted Output
          description: Redacted output of the trace or span.
        name:
          type: string
          title: Name
          description: Name of the trace, span or session.
          default: ''
        created_at:
          type: string
          format: date-time
          title: Created
          description: Timestamp of the trace or span's creation.
        user_metadata:
          additionalProperties:
            type: string
          type: object
          title: User Metadata
          description: Metadata associated with this trace or span.
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Tags associated with this trace or span.
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status Code
          description: >-
            Status code of the trace or span. Used for logging failure or error
            states.
        metrics:
          $ref: '#/components/schemas/Metrics'
          description: Metrics associated with this trace or span.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: A user-provided session, trace or span ID.
        dataset_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Input
          description: Input to the dataset associated with this trace
        dataset_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Output
          description: Output from the dataset associated with this trace
        dataset_metadata:
          additionalProperties:
            type: string
          type: object
          title: Dataset Metadata
          description: Metadata from the dataset associated with this trace
        id:
          type: string
          format: uuid4
          title: ID
          description: Galileo ID of the session, trace or span
        session_id:
          type: string
          format: uuid4
          title: Session ID
          description: >-
            Galileo ID of the session containing the trace (or the same value as
            id for a trace)
        trace_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Trace ID
          description: >-
            Galileo ID of the trace containing the span (or the same value as id
            for a trace)
        project_id:
          type: string
          format: uuid4
          title: Project ID
          description: Galileo ID of the project associated with this trace or span
        run_id:
          type: string
          format: uuid4
          title: Run ID
          description: >-
            Galileo ID of the run (log stream or experiment) associated with
            this trace or span
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated
          description: Timestamp of the session or trace or span's last update
        has_children:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Children
          description: Whether or not this trace or span has child spans
        metrics_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        session_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Session Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        feedback_rating_info:
          additionalProperties:
            $ref: '#/components/schemas/FeedbackRatingInfo'
          type: object
          title: Feedback Rating Info
          description: Feedback information related to the record
        annotations:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/AnnotationRatingInfo'
            propertyNames:
              format: uuid4
            type: object
          propertyNames:
            format: uuid4
          type: object
          title: Annotations
          description: Annotations keyed by template ID and annotator ID
        file_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: File Ids
          description: IDs of files associated with this record
        file_modalities:
          items:
            $ref: '#/components/schemas/ContentModality'
          type: array
          title: File Modalities
          description: Modalities of files associated with this record
        annotation_aggregates:
          additionalProperties:
            $ref: '#/components/schemas/AnnotationAggregate'
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Aggregates
          description: Annotation aggregate information keyed by template ID
        annotation_agreement:
          additionalProperties:
            type: number
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Agreement
          description: Annotation agreement scores keyed by template ID
        overall_annotation_agreement:
          anyOf:
            - type: number
            - type: 'null'
          title: Overall Annotation Agreement
          description: Average annotation agreement across all templates in the queue
        annotation_queue_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: Annotation Queue Ids
          description: IDs of annotation queues this record is in
        fully_annotated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Fully Annotated
          description: Whether every field is annotated by every annotator in the queue
        metric_info:
          anyOf:
            - additionalProperties:
                oneOf:
                  - $ref: '#/components/schemas/MetricNotComputed'
                  - $ref: '#/components/schemas/MetricPending'
                  - $ref: '#/components/schemas/MetricComputing'
                  - $ref: '#/components/schemas/MetricNotApplicable'
                  - $ref: '#/components/schemas/MetricSuccess'
                  - $ref: '#/components/schemas/MetricError'
                  - $ref: '#/components/schemas/MetricFailed'
                  - $ref: '#/components/schemas/MetricRollUp'
                discriminator:
                  propertyName: status_type
                  mapping:
                    computing:
                      $ref: '#/components/schemas/MetricComputing'
                    error:
                      $ref: '#/components/schemas/MetricError'
                    failed:
                      $ref: '#/components/schemas/MetricFailed'
                    not_applicable:
                      $ref: '#/components/schemas/MetricNotApplicable'
                    not_computed:
                      $ref: '#/components/schemas/MetricNotComputed'
                    pending:
                      $ref: '#/components/schemas/MetricPending'
                    roll_up:
                      $ref: '#/components/schemas/MetricRollUp'
                    success:
                      $ref: '#/components/schemas/MetricSuccess'
              type: object
            - type: 'null'
          title: Metric Info
          description: >-
            Detailed information about the metrics associated with this trace or
            span
        files:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/FileMetadata'
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Files
          description: File metadata keyed by file ID for files associated with this record
        parent_id:
          type: string
          format: uuid4
          title: Parent ID
          description: Galileo ID of the parent of this span
        is_complete:
          type: boolean
          title: Is Complete
          description: Whether the parent trace is complete or not
          default: true
        step_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Step Number
          description: Topological step number of the span.
      type: object
      required:
        - id
        - session_id
        - project_id
        - run_id
        - parent_id
      title: ExtendedRetrieverSpanRecord
    ExtendedControlSpanRecord:
      properties:
        type:
          type: string
          const: control
          title: Type
          description: Type of the trace, span or session.
          default: control
        input:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
          title: Input
          description: Input to the trace or span.
          default: ''
        redacted_input:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - type: 'null'
          title: Redacted Input
          description: Redacted input of the trace or span.
        output:
          anyOf:
            - $ref: '#/components/schemas/ControlResult'
            - type: 'null'
          description: Output of the trace or span.
        redacted_output:
          anyOf:
            - $ref: '#/components/schemas/ControlResult'
            - type: 'null'
          description: Redacted output of the trace or span.
        name:
          type: string
          title: Name
          description: Name of the trace, span or session.
          default: ''
        created_at:
          type: string
          format: date-time
          title: Created
          description: Timestamp of the trace or span's creation.
        user_metadata:
          additionalProperties:
            type: string
          type: object
          title: User Metadata
          description: Metadata associated with this trace or span.
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Tags associated with this trace or span.
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status Code
          description: >-
            Status code of the trace or span. Used for logging failure or error
            states.
        metrics:
          $ref: '#/components/schemas/Metrics'
          description: Metrics associated with this trace or span.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: A user-provided session, trace or span ID.
        dataset_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Input
          description: Input to the dataset associated with this trace
        dataset_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Output
          description: Output from the dataset associated with this trace
        dataset_metadata:
          additionalProperties:
            type: string
          type: object
          title: Dataset Metadata
          description: Metadata from the dataset associated with this trace
        id:
          type: string
          format: uuid4
          title: ID
          description: Galileo ID of the session, trace or span
        session_id:
          type: string
          format: uuid4
          title: Session ID
          description: >-
            Galileo ID of the session containing the trace (or the same value as
            id for a trace)
        trace_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Trace ID
          description: >-
            Galileo ID of the trace containing the span (or the same value as id
            for a trace)
        project_id:
          type: string
          format: uuid4
          title: Project ID
          description: Galileo ID of the project associated with this trace or span
        run_id:
          type: string
          format: uuid4
          title: Run ID
          description: >-
            Galileo ID of the run (log stream or experiment) associated with
            this trace or span
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated
          description: Timestamp of the session or trace or span's last update
        has_children:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Children
          description: Whether or not this trace or span has child spans
        metrics_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        session_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Session Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        feedback_rating_info:
          additionalProperties:
            $ref: '#/components/schemas/FeedbackRatingInfo'
          type: object
          title: Feedback Rating Info
          description: Feedback information related to the record
        annotations:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/AnnotationRatingInfo'
            propertyNames:
              format: uuid4
            type: object
          propertyNames:
            format: uuid4
          type: object
          title: Annotations
          description: Annotations keyed by template ID and annotator ID
        file_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: File Ids
          description: IDs of files associated with this record
        file_modalities:
          items:
            $ref: '#/components/schemas/ContentModality'
          type: array
          title: File Modalities
          description: Modalities of files associated with this record
        annotation_aggregates:
          additionalProperties:
            $ref: '#/components/schemas/AnnotationAggregate'
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Aggregates
          description: Annotation aggregate information keyed by template ID
        annotation_agreement:
          additionalProperties:
            type: number
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Agreement
          description: Annotation agreement scores keyed by template ID
        overall_annotation_agreement:
          anyOf:
            - type: number
            - type: 'null'
          title: Overall Annotation Agreement
          description: Average annotation agreement across all templates in the queue
        annotation_queue_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: Annotation Queue Ids
          description: IDs of annotation queues this record is in
        fully_annotated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Fully Annotated
          description: Whether every field is annotated by every annotator in the queue
        metric_info:
          anyOf:
            - additionalProperties:
                oneOf:
                  - $ref: '#/components/schemas/MetricNotComputed'
                  - $ref: '#/components/schemas/MetricPending'
                  - $ref: '#/components/schemas/MetricComputing'
                  - $ref: '#/components/schemas/MetricNotApplicable'
                  - $ref: '#/components/schemas/MetricSuccess'
                  - $ref: '#/components/schemas/MetricError'
                  - $ref: '#/components/schemas/MetricFailed'
                  - $ref: '#/components/schemas/MetricRollUp'
                discriminator:
                  propertyName: status_type
                  mapping:
                    computing:
                      $ref: '#/components/schemas/MetricComputing'
                    error:
                      $ref: '#/components/schemas/MetricError'
                    failed:
                      $ref: '#/components/schemas/MetricFailed'
                    not_applicable:
                      $ref: '#/components/schemas/MetricNotApplicable'
                    not_computed:
                      $ref: '#/components/schemas/MetricNotComputed'
                    pending:
                      $ref: '#/components/schemas/MetricPending'
                    roll_up:
                      $ref: '#/components/schemas/MetricRollUp'
                    success:
                      $ref: '#/components/schemas/MetricSuccess'
              type: object
            - type: 'null'
          title: Metric Info
          description: >-
            Detailed information about the metrics associated with this trace or
            span
        files:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/FileMetadata'
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Files
          description: File metadata keyed by file ID for files associated with this record
        parent_id:
          type: string
          format: uuid4
          title: Parent ID
          description: Galileo ID of the parent of this span
        is_complete:
          type: boolean
          title: Is Complete
          description: Whether the parent trace is complete or not
          default: true
        step_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Step Number
          description: Topological step number of the span.
        control_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Control Id
          description: Identifier of the control definition that produced this span.
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
          description: Normalized agent name associated with this control execution.
        check_stage:
          anyOf:
            - $ref: '#/components/schemas/ControlCheckStage'
            - type: 'null'
          description: Execution stage where the control ran, typically 'pre' or 'post'.
        applies_to:
          anyOf:
            - $ref: '#/components/schemas/ControlAppliesTo'
            - type: 'null'
          description: >-
            Parent execution type the control applied to, for example 'llm_call'
            or 'tool_call'.
        evaluator_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Evaluator Name
          description: >-
            Representative evaluator name for this control span. For composite
            controls, this is the primary evaluator chosen for observability
            identity.
        selector_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Selector Path
          description: >-
            Representative selector path for this control span. For composite
            controls, this is the primary selector path chosen for observability
            identity.
      type: object
      required:
        - id
        - session_id
        - project_id
        - run_id
        - parent_id
      title: ExtendedControlSpanRecord
    ExtendedSessionRecord:
      properties:
        type:
          type: string
          const: session
          title: Type
          description: Type of the trace, span or session.
          default: session
        input:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
          title: Input
          default: ''
        redacted_input:
          anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - type: 'null'
          title: Redacted Input
          description: Redacted input of the trace or span.
        output:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Message'
            - items:
                $ref: '#/components/schemas/Document-Output'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - $ref: '#/components/schemas/ControlResult'
            - type: 'null'
          title: Output
          description: Output of the trace or span.
        redacted_output:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Message'
            - items:
                $ref: '#/components/schemas/Document-Output'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
            - $ref: '#/components/schemas/ControlResult'
            - type: 'null'
          title: Redacted Output
          description: Redacted output of the trace or span.
        name:
          type: string
          title: Name
          description: Name of the trace, span or session.
          default: ''
        created_at:
          type: string
          format: date-time
          title: Created
          description: Timestamp of the trace or span's creation.
        user_metadata:
          additionalProperties:
            type: string
          type: object
          title: User Metadata
          description: Metadata associated with this trace or span.
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Tags associated with this trace or span.
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status Code
          description: >-
            Status code of the trace or span. Used for logging failure or error
            states.
        metrics:
          $ref: '#/components/schemas/Metrics'
          description: Metrics associated with this trace or span.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: A user-provided session, trace or span ID.
        dataset_input:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Input
          description: Input to the dataset associated with this trace
        dataset_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Output
          description: Output from the dataset associated with this trace
        dataset_metadata:
          additionalProperties:
            type: string
          type: object
          title: Dataset Metadata
          description: Metadata from the dataset associated with this trace
        id:
          type: string
          format: uuid4
          title: ID
          description: Galileo ID of the session
        session_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Session ID
          description: Galileo ID of the session containing the trace or span or session
        trace_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Trace ID
          description: >-
            Galileo ID of the trace containing the span (or the same value as id
            for a trace)
        project_id:
          type: string
          format: uuid4
          title: Project ID
          description: Galileo ID of the project associated with this trace or span
        run_id:
          type: string
          format: uuid4
          title: Run ID
          description: >-
            Galileo ID of the run (log stream or experiment) associated with
            this trace or span
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated
          description: Timestamp of the session or trace or span's last update
        has_children:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Children
          description: Whether or not this trace or span has child spans
        metrics_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        session_batch_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Session Batch Id
          description: Galileo ID of the metrics batch associated with this trace or span
        feedback_rating_info:
          additionalProperties:
            $ref: '#/components/schemas/FeedbackRatingInfo'
          type: object
          title: Feedback Rating Info
          description: Feedback information related to the record
        annotations:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/AnnotationRatingInfo'
            propertyNames:
              format: uuid4
            type: object
          propertyNames:
            format: uuid4
          type: object
          title: Annotations
          description: Annotations keyed by template ID and annotator ID
        file_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: File Ids
          description: IDs of files associated with this record
        file_modalities:
          items:
            $ref: '#/components/schemas/ContentModality'
          type: array
          title: File Modalities
          description: Modalities of files associated with this record
        annotation_aggregates:
          additionalProperties:
            $ref: '#/components/schemas/AnnotationAggregate'
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Aggregates
          description: Annotation aggregate information keyed by template ID
        annotation_agreement:
          additionalProperties:
            type: number
          propertyNames:
            format: uuid4
          type: object
          title: Annotation Agreement
          description: Annotation agreement scores keyed by template ID
        overall_annotation_agreement:
          anyOf:
            - type: number
            - type: 'null'
          title: Overall Annotation Agreement
          description: Average annotation agreement across all templates in the queue
        annotation_queue_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: Annotation Queue Ids
          description: IDs of annotation queues this record is in
        fully_annotated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Fully Annotated
          description: Whether every field is annotated by every annotator in the queue
        metric_info:
          anyOf:
            - additionalProperties:
                oneOf:
                  - $ref: '#/components/schemas/MetricNotComputed'
                  - $ref: '#/components/schemas/MetricPending'
                  - $ref: '#/components/schemas/MetricComputing'
                  - $ref: '#/components/schemas/MetricNotApplicable'
                  - $ref: '#/components/schemas/MetricSuccess'
                  - $ref: '#/components/schemas/MetricError'
                  - $ref: '#/components/schemas/MetricFailed'
                  - $ref: '#/components/schemas/MetricRollUp'
                discriminator:
                  propertyName: status_type
                  mapping:
                    computing:
                      $ref: '#/components/schemas/MetricComputing'
                    error:
                      $ref: '#/components/schemas/MetricError'
                    failed:
                      $ref: '#/components/schemas/MetricFailed'
                    not_applicable:
                      $ref: '#/components/schemas/MetricNotApplicable'
                    not_computed:
                      $ref: '#/components/schemas/MetricNotComputed'
                    pending:
                      $ref: '#/components/schemas/MetricPending'
                    roll_up:
                      $ref: '#/components/schemas/MetricRollUp'
                    success:
                      $ref: '#/components/schemas/MetricSuccess'
              type: object
            - type: 'null'
          title: Metric Info
          description: >-
            Detailed information about the metrics associated with this trace or
            span
        files:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/FileMetadata'
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Files
          description: File metadata keyed by file ID for files associated with this record
        previous_session_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Previous Session Id
        num_traces:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Traces
      type: object
      required:
        - id
        - project_id
        - run_id
      title: ExtendedSessionRecord
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    FilterLeaf_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____:
      properties:
        filter:
          oneOf:
            - $ref: '#/components/schemas/LogRecordsIDFilter'
            - $ref: '#/components/schemas/LogRecordsDateFilter'
            - $ref: '#/components/schemas/LogRecordsNumberFilter'
            - $ref: '#/components/schemas/LogRecordsBooleanFilter'
            - $ref: '#/components/schemas/LogRecordsCollectionFilter'
            - $ref: '#/components/schemas/LogRecordsTextFilter'
            - $ref: '#/components/schemas/LogRecordsFullyAnnotatedFilter'
          title: Filter
          discriminator:
            propertyName: type
            mapping:
              boolean:
                $ref: '#/components/schemas/LogRecordsBooleanFilter'
              collection:
                $ref: '#/components/schemas/LogRecordsCollectionFilter'
              date:
                $ref: '#/components/schemas/LogRecordsDateFilter'
              fully_annotated:
                $ref: '#/components/schemas/LogRecordsFullyAnnotatedFilter'
              id:
                $ref: '#/components/schemas/LogRecordsIDFilter'
              number:
                $ref: '#/components/schemas/LogRecordsNumberFilter'
              text:
                $ref: '#/components/schemas/LogRecordsTextFilter'
      type: object
      required:
        - filter
      title: >-
        FilterLeaf[Annotated[Union[LogRecordsIDFilter, LogRecordsDateFilter,
        LogRecordsNumberFilter, LogRecordsBooleanFilter,
        LogRecordsCollectionFilter, LogRecordsTextFilter,
        LogRecordsFullyAnnotatedFilter], FieldInfo(annotation=NoneType,
        required=True, discriminator='type')]]
    AndNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input:
      properties:
        and:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/FilterLeaf_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____
              - $ref: >-
                  #/components/schemas/AndNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
              - $ref: >-
                  #/components/schemas/OrNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
              - $ref: >-
                  #/components/schemas/NotNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
          type: array
          title: And
      type: object
      required:
        - and
      title: >-
        AndNode[Annotated[Union[LogRecordsIDFilter, LogRecordsDateFilter,
        LogRecordsNumberFilter, LogRecordsBooleanFilter,
        LogRecordsCollectionFilter, LogRecordsTextFilter,
        LogRecordsFullyAnnotatedFilter], FieldInfo(annotation=NoneType,
        required=True, discriminator='type')]]
    OrNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input:
      properties:
        or:
          items:
            anyOf:
              - $ref: >-
                  #/components/schemas/FilterLeaf_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____
              - $ref: >-
                  #/components/schemas/AndNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
              - $ref: >-
                  #/components/schemas/OrNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
              - $ref: >-
                  #/components/schemas/NotNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
          type: array
          title: Or
      type: object
      required:
        - or
      title: >-
        OrNode[Annotated[Union[LogRecordsIDFilter, LogRecordsDateFilter,
        LogRecordsNumberFilter, LogRecordsBooleanFilter,
        LogRecordsCollectionFilter, LogRecordsTextFilter,
        LogRecordsFullyAnnotatedFilter], FieldInfo(annotation=NoneType,
        required=True, discriminator='type')]]
    NotNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input:
      properties:
        not:
          anyOf:
            - $ref: >-
                #/components/schemas/FilterLeaf_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____
            - $ref: >-
                #/components/schemas/AndNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
            - $ref: >-
                #/components/schemas/OrNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
            - $ref: >-
                #/components/schemas/NotNode_Annotated_Union_LogRecordsIDFilter__LogRecordsDateFilter__LogRecordsNumberFilter__LogRecordsBooleanFilter__LogRecordsCollectionFilter__LogRecordsTextFilter__LogRecordsFullyAnnotatedFilter___FieldInfo_annotation_NoneType__required_True__discriminator__type____-Input
          title: Not
      type: object
      required:
        - not
      title: >-
        NotNode[Annotated[Union[LogRecordsIDFilter, LogRecordsDateFilter,
        LogRecordsNumberFilter, LogRecordsBooleanFilter,
        LogRecordsCollectionFilter, LogRecordsTextFilter,
        LogRecordsFullyAnnotatedFilter], FieldInfo(annotation=NoneType,
        required=True, discriminator='type')]]
    TextContentPart:
      properties:
        type:
          type: string
          const: text
          title: Type
          default: text
        text:
          type: string
          title: Text
      type: object
      required:
        - text
      title: TextContentPart
      description: A text segment within a message.
    FileContentPart:
      properties:
        type:
          type: string
          const: file
          title: Type
          default: file
        file_id:
          type: string
          format: uuid4
          title: File Id
      type: object
      required:
        - file_id
      title: FileContentPart
      description: |-
        Reference to a file associated with this message.

        The file_id can be resolved via the ``files`` dict returned on
        trace/span detail responses, which contains metadata such as
        modality, MIME type, and a presigned download URL.
    Metrics:
      properties:
        duration_ns:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ns
          description: >-
            Duration of the trace or span in nanoseconds.  Displayed as
            'Latency' in Galileo.
      additionalProperties: true
      type: object
      title: Metrics
    FeedbackRatingInfo:
      properties:
        feedback_type:
          $ref: '#/components/schemas/FeedbackType'
        value:
          anyOf:
            - type: boolean
            - type: integer
            - type: string
            - items:
                type: string
                maxLength: 255
                minLength: 1
              type: array
          title: Value
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
      type: object
      required:
        - feedback_type
        - value
        - explanation
      title: FeedbackRatingInfo
    AnnotationRatingInfo:
      properties:
        annotation_type:
          $ref: '#/components/schemas/AnnotationType'
        value:
          anyOf:
            - type: boolean
            - type: integer
            - type: string
            - items:
                type: string
                maxLength: 255
                minLength: 1
              type: array
          title: Value
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
      type: object
      required:
        - annotation_type
        - value
        - explanation
      title: AnnotationRatingInfo
    ContentModality:
      type: string
      enum:
        - text
        - document
        - image
        - audio
        - video
      title: ContentModality
      description: Classification of content modality
    AnnotationAggregate:
      properties:
        aggregate:
          oneOf:
            - $ref: '#/components/schemas/AnnotationLikeDislikeAggregate'
            - $ref: '#/components/schemas/AnnotationStarAggregate'
            - $ref: '#/components/schemas/AnnotationScoreAggregate'
            - $ref: '#/components/schemas/AnnotationTagsAggregate'
            - $ref: '#/components/schemas/AnnotationTextAggregate'
          title: Aggregate
          discriminator:
            propertyName: annotation_type
            mapping:
              like_dislike:
                $ref: '#/components/schemas/AnnotationLikeDislikeAggregate'
              score:
                $ref: '#/components/schemas/AnnotationScoreAggregate'
              star:
                $ref: '#/components/schemas/AnnotationStarAggregate'
              tags:
                $ref: '#/components/schemas/AnnotationTagsAggregate'
              text:
                $ref: '#/components/schemas/AnnotationTextAggregate'
      type: object
      required:
        - aggregate
      title: AnnotationAggregate
    MetricNotComputed:
      properties:
        status_type:
          type: string
          const: not_computed
          title: Status Type
          default: not_computed
        scorer_type:
          anyOf:
            - $ref: '#/components/schemas/ScorerType'
            - type: 'null'
        metric_key_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Metric Key Alias
        message:
          type: string
          title: Message
          default: Metric not computed.
      type: object
      title: MetricNotComputed
    MetricPending:
      properties:
        status_type:
          type: string
          const: pending
          title: Status Type
          default: pending
        scorer_type:
          anyOf:
            - $ref: '#/components/schemas/ScorerType'
            - type: 'null'
        metric_key_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Metric Key Alias
      type: object
      title: MetricPending
    MetricComputing:
      properties:
        status_type:
          type: string
          const: computing
          title: Status Type
          default: computing
        scorer_type:
          anyOf:
            - $ref: '#/components/schemas/ScorerType'
            - type: 'null'
        metric_key_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Metric Key Alias
        message:
          type: string
          title: Message
          default: Metric is computing.
      type: object
      title: MetricComputing
    MetricNotApplicable:
      properties:
        status_type:
          type: string
          const: not_applicable
          title: Status Type
          default: not_applicable
        scorer_type:
          anyOf:
            - $ref: '#/components/schemas/ScorerType'
            - type: 'null'
        metric_key_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Metric Key Alias
        message:
          type: string
          title: Message
          default: Metric not applicable.
        ems_error_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ems Error Code
          description: >-
            EMS error code from errors.yaml catalog for this not-applicable
            reason
        standard_error:
          anyOf:
            - $ref: '#/components/schemas/StandardError'
            - type: 'null'
          description: Structured EMS error resolved on-the-fly from errors.yaml catalog
      type: object
      title: MetricNotApplicable
    MetricSuccess:
      properties:
        status_type:
          type: string
          const: success
          title: Status Type
          default: success
        scorer_type:
          anyOf:
            - $ref: '#/components/schemas/ScorerType'
            - type: 'null'
        metric_key_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Metric Key Alias
        value:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - type: string
              format: uuid
            - type: string
              format: date-time
            - $ref: '#/components/schemas/Segment'
            - $ref: '#/components/schemas/HallucinationSegment'
            - $ref: '#/components/schemas/Document-Output'
            - $ref: '#/components/schemas/FeedbackRatingDB'
            - $ref: '#/components/schemas/FeedbackAggregate'
            - items:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - type: boolean
                  - type: string
                    format: uuid
                  - type: string
                    format: date-time
                  - $ref: '#/components/schemas/Segment'
                  - $ref: '#/components/schemas/HallucinationSegment'
                  - $ref: '#/components/schemas/Document-Output'
                  - $ref: '#/components/schemas/FeedbackRatingDB'
                  - $ref: '#/components/schemas/FeedbackAggregate'
                  - type: 'null'
              type: array
            - items:
                items:
                  anyOf:
                    - type: string
                    - type: integer
                    - type: number
                    - type: boolean
                    - type: string
                      format: uuid
                    - type: string
                      format: date-time
                    - $ref: '#/components/schemas/Segment'
                    - $ref: '#/components/schemas/HallucinationSegment'
                    - $ref: '#/components/schemas/Document-Output'
                    - $ref: '#/components/schemas/FeedbackRatingDB'
                    - $ref: '#/components/schemas/FeedbackAggregate'
                    - type: 'null'
                type: array
              type: array
            - items:
                items:
                  items:
                    anyOf:
                      - type: string
                      - type: integer
                      - type: number
                      - type: boolean
                      - type: string
                        format: uuid
                      - type: string
                        format: date-time
                      - $ref: '#/components/schemas/Segment'
                      - $ref: '#/components/schemas/HallucinationSegment'
                      - $ref: '#/components/schemas/Document-Output'
                      - $ref: '#/components/schemas/FeedbackRatingDB'
                      - $ref: '#/components/schemas/FeedbackAggregate'
                      - type: 'null'
                  type: array
                type: array
              type: array
            - type: 'null'
          title: Value
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
        cost:
          anyOf:
            - type: number
            - type: 'null'
          title: Cost
        model_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Alias
        num_judges:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Judges
        input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Input Tokens
        output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Output Tokens
        total_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Tokens
        critique:
          anyOf:
            - $ref: '#/components/schemas/MetricCritiqueColumnar'
            - type: 'null'
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            Optional per-row context returned alongside the score by code-based
            scorers that return a (score, metadata) tuple. Sourced from the
            {metric_name}_metadata auxiliary key, which is stored as a JSON
            string in ClickHouse.
        display_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Value
        rationale:
          anyOf:
            - type: string
            - type: 'null'
          title: Rationale
      type: object
      required:
        - value
      title: MetricSuccess
    MetricError:
      properties:
        status_type:
          type: string
          const: error
          title: Status Type
          default: error
        scorer_type:
          anyOf:
            - $ref: '#/components/schemas/ScorerType'
            - type: 'null'
        metric_key_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Metric Key Alias
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: An error occured.
        ems_error_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ems Error Code
          description: EMS error code from errors.yaml catalog for this metric error
        standard_error:
          anyOf:
            - $ref: '#/components/schemas/StandardError'
            - type: 'null'
          description: Structured EMS error resolved on-the-fly from errors.yaml catalog
      type: object
      title: MetricError
    MetricFailed:
      properties:
        status_type:
          type: string
          const: failed
          title: Status Type
          default: failed
        scorer_type:
          anyOf:
            - $ref: '#/components/schemas/ScorerType'
            - type: 'null'
        metric_key_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Metric Key Alias
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: Metric failed to compute.
        ems_error_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ems Error Code
          description: EMS error code from errors.yaml catalog for this metric failure
        standard_error:
          anyOf:
            - $ref: '#/components/schemas/StandardError'
            - type: 'null'
          description: Structured EMS error resolved on-the-fly from errors.yaml catalog
      type: object
      title: MetricFailed
    MetricRollUp:
      properties:
        status_type:
          type: string
          const: roll_up
          title: Status Type
          default: roll_up
        scorer_type:
          anyOf:
            - $ref: '#/components/schemas/ScorerType'
            - type: 'null'
        metric_key_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Metric Key Alias
        value:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - type: string
              format: uuid
            - type: string
              format: date-time
            - $ref: '#/components/schemas/Segment'
            - $ref: '#/components/schemas/HallucinationSegment'
            - $ref: '#/components/schemas/Document-Output'
            - $ref: '#/components/schemas/FeedbackRatingDB'
            - $ref: '#/components/schemas/FeedbackAggregate'
            - items:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - type: boolean
                  - type: string
                    format: uuid
                  - type: string
                    format: date-time
                  - $ref: '#/components/schemas/Segment'
                  - $ref: '#/components/schemas/HallucinationSegment'
                  - $ref: '#/components/schemas/Document-Output'
                  - $ref: '#/components/schemas/FeedbackRatingDB'
                  - $ref: '#/components/schemas/FeedbackAggregate'
                  - type: 'null'
              type: array
            - items:
                items:
                  anyOf:
                    - type: string
                    - type: integer
                    - type: number
                    - type: boolean
                    - type: string
                      format: uuid
                    - type: string
                      format: date-time
                    - $ref: '#/components/schemas/Segment'
                    - $ref: '#/components/schemas/HallucinationSegment'
                    - $ref: '#/components/schemas/Document-Output'
                    - $ref: '#/components/schemas/FeedbackRatingDB'
                    - $ref: '#/components/schemas/FeedbackAggregate'
                    - type: 'null'
                type: array
              type: array
            - items:
                items:
                  items:
                    anyOf:
                      - type: string
                      - type: integer
                      - type: number
                      - type: boolean
                      - type: string
                        format: uuid
                      - type: string
                        format: date-time
                      - $ref: '#/components/schemas/Segment'
                      - $ref: '#/components/schemas/HallucinationSegment'
                      - $ref: '#/components/schemas/Document-Output'
                      - $ref: '#/components/schemas/FeedbackRatingDB'
                      - $ref: '#/components/schemas/FeedbackAggregate'
                      - type: 'null'
                  type: array
                type: array
              type: array
            - type: 'null'
          title: Value
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
        cost:
          anyOf:
            - type: number
            - type: 'null'
          title: Cost
        model_alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Alias
        num_judges:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Judges
        input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Input Tokens
        output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Output Tokens
        total_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Tokens
        critique:
          anyOf:
            - $ref: '#/components/schemas/MetricCritiqueColumnar'
            - type: 'null'
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            Optional per-row context returned alongside the score by code-based
            scorers that return a (score, metadata) tuple. Sourced from the
            {metric_name}_metadata auxiliary key, which is stored as a JSON
            string in ClickHouse.
        roll_up_metrics:
          additionalProperties:
            anyOf:
              - type: number
              - additionalProperties:
                  type: integer
                type: object
          type: object
          title: Roll Up Metrics
          description: >-
            Roll up metrics e.g. sum, average, min, max for numeric, and
            category_count for categorical metrics.
      type: object
      required:
        - value
      title: MetricRollUp
    FileMetadata:
      properties:
        file_id:
          type: string
          format: uuid4
          title: File Id
        modality:
          $ref: '#/components/schemas/ContentModality'
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Presigned S3 URL or external URL
        url_expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Url Expires At
          description: Expiration time
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
        source:
          $ref: '#/components/schemas/FileSource'
        status:
          $ref: '#/components/schemas/FileStatus'
      type: object
      required:
        - file_id
        - modality
        - source
        - status
      title: FileMetadata
      description: |-
        Enriched file metadata returned to UI/SDK.

        Contains presigned URLs and properties for displaying multimodal
        content in the Galileo console and SDKs.
    Message:
      properties:
        content:
          anyOf:
            - type: string
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextContentPart'
                  - $ref: '#/components/schemas/FileContentPart'
                discriminator:
                  propertyName: type
                  mapping:
                    file:
                      $ref: '#/components/schemas/FileContentPart'
                    text:
                      $ref: '#/components/schemas/TextContentPart'
              type: array
          title: Content
        role:
          $ref: '#/components/schemas/MessageRole'
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Id
        tool_calls:
          anyOf:
            - items:
                $ref: '#/components/schemas/ToolCall'
              type: array
            - type: 'null'
          title: Tool Calls
      type: object
      required:
        - content
        - role
      title: Message
    Document-Output:
      properties:
        content:
          type: string
          title: Content
          description: Content of the document.
        metadata:
          additionalProperties:
            anyOf:
              - type: boolean
              - type: string
              - type: integer
              - type: number
          type: object
          title: Metadata
      additionalProperties: false
      type: object
      required:
        - content
      title: Document
    ControlResult:
      properties:
        action:
          $ref: '#/components/schemas/ControlAction'
          description: Decision/action produced by the control.
        matched:
          type: boolean
          title: Matched
          description: >-
            Whether the control matched. False covers both non-match and error
            cases; use error_message to distinguish errors.
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
          description: Confidence score reported by the control evaluation result.
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: >-
            Error text when control evaluation failed. This should be null for
            normal matches and non-matches.
      type: object
      required:
        - action
        - matched
      title: ControlResult
    AgentType:
      type: string
      enum:
        - default
        - planner
        - react
        - reflection
        - router
        - classifier
        - supervisor
        - judge
      title: AgentType
    LlmMetrics:
      properties:
        duration_ns:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ns
          description: >-
            Duration of the trace or span in nanoseconds.  Displayed as
            'Latency' in Galileo.
        num_input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Input Tokens
          description: Number of input tokens.
        num_output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Output Tokens
          description: Number of output tokens.
        num_total_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Total Tokens
          description: Total number of tokens.
        time_to_first_token_ns:
          anyOf:
            - type: integer
            - type: 'null'
          title: Time To First Token Ns
          description: Time until the first token was generated in nanoseconds.
      additionalProperties: true
      type: object
      title: LlmMetrics
    MessageEvent:
      properties:
        type:
          type: string
          const: message
          title: Type
          default: message
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique identifier for the event
        status:
          anyOf:
            - $ref: '#/components/schemas/EventStatus'
            - type: 'null'
          description: Status of the event
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Provider-specific metadata and additional fields
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if the event failed
        role:
          $ref: '#/components/schemas/MessageRole'
          description: Role of the message sender
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: Text content of the message
        content_parts:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Content Parts
          description: Structured content items (text, audio, images, etc.)
      type: object
      required:
        - role
      title: MessageEvent
      description: An output message from the model.
    ReasoningEvent:
      properties:
        type:
          type: string
          const: reasoning
          title: Type
          default: reasoning
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique identifier for the event
        status:
          anyOf:
            - $ref: '#/components/schemas/EventStatus'
            - type: 'null'
          description: Status of the event
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Provider-specific metadata and additional fields
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if the event failed
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: The reasoning/thinking content
        summary:
          anyOf:
            - type: string
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Summary
          description: Summary of the reasoning
      type: object
      title: ReasoningEvent
      description: >-
        Internal reasoning/thinking from the model (e.g., OpenAI o1/o3 reasoning
        tokens).
    InternalToolCall:
      properties:
        type:
          type: string
          const: internal_tool_call
          title: Type
          default: internal_tool_call
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique identifier for the event
        status:
          anyOf:
            - $ref: '#/components/schemas/EventStatus'
            - type: 'null'
          description: Status of the event
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Provider-specific metadata and additional fields
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if the event failed
        name:
          type: string
          title: Name
          description: >-
            Name of the internal tool (e.g., 'web_search', 'code_interpreter',
            'file_search')
        input:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input
          description: Input/arguments to the tool call
        output:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Output
          description: Output/results from the tool call
      type: object
      required:
        - name
      title: InternalToolCall
      description: >-
        A tool call executed internally by the model during reasoning.


        This represents internal tools like web search, code execution, file
        search, etc.

        that the model invokes (not user-defined functions or MCP tools).
    WebSearchCallEvent:
      properties:
        type:
          type: string
          const: web_search_call
          title: Type
          default: web_search_call
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique identifier for the event
        status:
          anyOf:
            - $ref: '#/components/schemas/EventStatus'
            - type: 'null'
          description: Status of the event
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Provider-specific metadata and additional fields
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if the event failed
        action:
          $ref: '#/components/schemas/WebSearchAction'
          description: Web search action payload
      type: object
      required:
        - action
      title: WebSearchCallEvent
      description: An OpenAI-style web search call event.
    ImageGenerationEvent:
      properties:
        type:
          type: string
          const: image_generation
          title: Type
          default: image_generation
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique identifier for the event
        status:
          anyOf:
            - $ref: '#/components/schemas/EventStatus'
            - type: 'null'
          description: Status of the event
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Provider-specific metadata and additional fields
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if the event failed
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
          description: The prompt used for image generation
        images:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Images
          description: Generated images with URLs or base64 data
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: Image generation model used
      type: object
      title: ImageGenerationEvent
      description: An image generation event from the model.
    MCPCallEvent:
      properties:
        type:
          type: string
          const: mcp_call
          title: Type
          default: mcp_call
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique identifier for the event
        status:
          anyOf:
            - $ref: '#/components/schemas/EventStatus'
            - type: 'null'
          description: Status of the event
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Provider-specific metadata and additional fields
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if the event failed
        tool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Name
          description: Name of the MCP tool being called
        server_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Server Name
          description: Name of the MCP server
        arguments:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Arguments
          description: Arguments for the MCP tool call
        result:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result
          description: Result from the MCP tool call
      type: object
      title: MCPCallEvent
      description: >-
        A Model Context Protocol (MCP) tool call.


        MCP is a protocol for connecting LLMs to external tools/data sources.

        This is distinct from internal tools because it involves external
        integrations.
    MCPListToolsEvent:
      properties:
        type:
          type: string
          const: mcp_list_tools
          title: Type
          default: mcp_list_tools
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique identifier for the event
        status:
          anyOf:
            - $ref: '#/components/schemas/EventStatus'
            - type: 'null'
          description: Status of the event
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Provider-specific metadata and additional fields
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if the event failed
        server_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Server Name
          description: Name of the MCP server
        tools:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Tools
          description: List of available MCP tools
      type: object
      title: MCPListToolsEvent
      description: MCP list tools event - when the model queries available MCP tools.
    MCPApprovalRequestEvent:
      properties:
        type:
          type: string
          const: mcp_approval_request
          title: Type
          default: mcp_approval_request
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique identifier for the event
        status:
          anyOf:
            - $ref: '#/components/schemas/EventStatus'
            - type: 'null'
          description: Status of the event
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Provider-specific metadata and additional fields
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if the event failed
        tool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Name
          description: Name of the MCP tool requiring approval
        tool_invocation:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tool Invocation
          description: Details of the tool invocation requiring approval
        approved:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Approved
          description: Whether the request was approved
      type: object
      title: MCPApprovalRequestEvent
      description: >-
        MCP approval request - when human approval is needed for an MCP tool
        call.
    ControlCheckStage:
      type: string
      enum:
        - pre
        - post
      title: ControlCheckStage
    ControlAppliesTo:
      type: string
      enum:
        - llm_call
        - tool_call
      title: ControlAppliesTo
    FeedbackType:
      type: string
      enum:
        - like_dislike
        - star
        - score
        - tags
        - text
      title: FeedbackType
    AnnotationType:
      type: string
      enum:
        - like_dislike
        - star
        - score
        - tags
        - text
      title: AnnotationType
    AnnotationLikeDislikeAggregate:
      properties:
        annotation_type:
          type: string
          const: like_dislike
          title: Annotation Type
          default: like_dislike
        like_count:
          type: integer
          title: Like Count
        dislike_count:
          type: integer
          title: Dislike Count
        unrated_count:
          type: integer
          title: Unrated Count
        tie_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tie Count
      type: object
      required:
        - like_count
        - dislike_count
        - unrated_count
      title: AnnotationLikeDislikeAggregate
    AnnotationStarAggregate:
      properties:
        annotation_type:
          type: string
          const: star
          title: Annotation Type
          default: star
        average:
          type: number
          title: Average
        counts:
          additionalProperties:
            type: integer
          type: object
          title: Counts
        unrated_count:
          type: integer
          title: Unrated Count
      type: object
      required:
        - average
        - counts
        - unrated_count
      title: AnnotationStarAggregate
    AnnotationScoreAggregate:
      properties:
        annotation_type:
          type: string
          const: score
          title: Annotation Type
          default: score
        buckets:
          items:
            $ref: '#/components/schemas/ScoreBucket'
          type: array
          title: Buckets
        average:
          type: number
          title: Average
        unrated_count:
          type: integer
          title: Unrated Count
      type: object
      required:
        - buckets
        - average
        - unrated_count
      title: AnnotationScoreAggregate
    AnnotationTagsAggregate:
      properties:
        annotation_type:
          type: string
          const: tags
          title: Annotation Type
          default: tags
        counts:
          additionalProperties:
            type: integer
          type: object
          title: Counts
        unrated_count:
          type: integer
          title: Unrated Count
      type: object
      required:
        - counts
        - unrated_count
      title: AnnotationTagsAggregate
    AnnotationTextAggregate:
      properties:
        annotation_type:
          type: string
          const: text
          title: Annotation Type
          default: text
        count:
          type: integer
          title: Count
        unrated_count:
          type: integer
          title: Unrated Count
      type: object
      required:
        - count
        - unrated_count
      title: AnnotationTextAggregate
    ScorerType:
      type: string
      enum:
        - Luna
        - Plus
      title: ScorerType
    StandardError:
      properties:
        error_code:
          type: integer
          title: Error Code
        error_type:
          $ref: '#/components/schemas/ErrorType'
        error_group:
          type: string
          title: Error Group
        severity:
          $ref: '#/components/schemas/ErrorSeverity'
        message:
          type: string
          title: Message
        user_action:
          anyOf:
            - type: string
            - type: 'null'
          title: User Action
        documentation_link:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Documentation Link
        retriable:
          type: boolean
          title: Retriable
          default: false
        blocking:
          type: boolean
          title: Blocking
          default: false
        http_status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Http Status Code
        source_service:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Service
        context:
          additionalProperties: true
          type: object
          title: Context
      type: object
      required:
        - error_code
        - error_type
        - error_group
        - severity
        - message
      title: StandardError
    Segment:
      properties:
        start:
          type: integer
          title: Start
        end:
          type: integer
          title: End
        value:
          anyOf:
            - type: number
            - type: integer
            - type: string
          title: Value
        prob:
          anyOf:
            - type: number
            - type: 'null'
          title: Prob
      type: object
      required:
        - start
        - end
        - value
      title: Segment
    HallucinationSegment:
      properties:
        hallucination_severity:
          type: integer
          maximum: 2
          minimum: 0
          title: Hallucination Severity
          default: 0
        start:
          type: integer
          title: Start
        end:
          type: integer
          title: End
        hallucination:
          type: number
          title: Hallucination
      type: object
      required:
        - start
        - end
        - hallucination
      title: HallucinationSegment
    FeedbackRatingDB:
      properties:
        explanation:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Explanation
        rating:
          oneOf:
            - $ref: >-
                #/components/schemas/libs__python__schemas__log_records__feedback__LikeDislikeRating
            - $ref: >-
                #/components/schemas/libs__python__schemas__log_records__feedback__StarRating
            - $ref: >-
                #/components/schemas/libs__python__schemas__log_records__feedback__ScoreRating
            - $ref: >-
                #/components/schemas/libs__python__schemas__log_records__feedback__TagsRating
            - $ref: >-
                #/components/schemas/libs__python__schemas__log_records__feedback__TextRating
          title: Rating
          discriminator:
            propertyName: feedback_type
            mapping:
              like_dislike:
                $ref: >-
                  #/components/schemas/libs__python__schemas__log_records__feedback__LikeDislikeRating
              score:
                $ref: >-
                  #/components/schemas/libs__python__schemas__log_records__feedback__ScoreRating
              star:
                $ref: >-
                  #/components/schemas/libs__python__schemas__log_records__feedback__StarRating
              tags:
                $ref: >-
                  #/components/schemas/libs__python__schemas__log_records__feedback__TagsRating
              text:
                $ref: >-
                  #/components/schemas/libs__python__schemas__log_records__feedback__TextRating
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Created By
      type: object
      required:
        - rating
        - created_at
        - created_by
      title: FeedbackRatingDB
    FeedbackAggregate:
      properties:
        aggregate:
          oneOf:
            - $ref: '#/components/schemas/LikeDislikeAggregate'
            - $ref: '#/components/schemas/StarAggregate'
            - $ref: '#/components/schemas/ScoreAggregate'
            - $ref: '#/components/schemas/TagsAggregate'
            - $ref: '#/components/schemas/TextAggregate'
          title: Aggregate
          discriminator:
            propertyName: feedback_type
            mapping:
              like_dislike:
                $ref: '#/components/schemas/LikeDislikeAggregate'
              score:
                $ref: '#/components/schemas/ScoreAggregate'
              star:
                $ref: '#/components/schemas/StarAggregate'
              tags:
                $ref: '#/components/schemas/TagsAggregate'
              text:
                $ref: '#/components/schemas/TextAggregate'
      type: object
      required:
        - aggregate
      title: FeedbackAggregate
    MetricCritiqueColumnar:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        is_computed:
          type: boolean
          title: Is Computed
        revised_explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Revised Explanation
        critique_info:
          $ref: '#/components/schemas/MetricCritiqueContent'
      type: object
      required:
        - id
        - is_computed
        - revised_explanation
        - critique_info
      title: MetricCritiqueColumnar
    FileSource:
      type: string
      enum:
        - direct_upload
        - external_files_api
        - external_url
        - assembled_stream
      title: FileSource
      description: Source of the file data.
    FileStatus:
      type: string
      enum:
        - complete
        - failed
        - pending
        - not_uploaded
      title: FileStatus
      description: Processing status of the file.
    MessageRole:
      type: string
      enum:
        - agent
        - assistant
        - developer
        - function
        - system
        - tool
        - user
      title: MessageRole
    ToolCall:
      properties:
        id:
          type: string
          title: Id
        function:
          $ref: '#/components/schemas/ToolCallFunction'
      type: object
      required:
        - id
        - function
      title: ToolCall
    ControlAction:
      type: string
      enum:
        - deny
        - steer
        - observe
      title: ControlAction
    EventStatus:
      type: string
      enum:
        - in_progress
        - completed
        - failed
        - cancelled
        - incomplete
      title: EventStatus
      description: Common status values for events.
    WebSearchAction:
      properties:
        type:
          type: string
          const: search
          title: Type
          description: Type of web search action
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
          description: Search query string
        sources:
          anyOf:
            - {}
            - type: 'null'
          title: Sources
          description: Optional provider-specific sources
      type: object
      required:
        - type
      title: WebSearchAction
      description: Action payload for a web search call event.
    ScoreBucket:
      properties:
        min_inclusive:
          type: integer
          title: Min Inclusive
        max_exclusive:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Exclusive
        count:
          type: integer
          title: Count
      type: object
      required:
        - min_inclusive
        - max_exclusive
        - count
      title: ScoreBucket
    ErrorType:
      type: string
      enum:
        - llm_api_error
        - credentials_error
        - data_validation_error
        - configuration_error
        - permission_error
        - not_found_error
        - workflow_error
        - system_error
        - not_applicable_reason
        - uncataloged_error
      title: ErrorType
    ErrorSeverity:
      type: string
      enum:
        - low
        - medium
        - high
        - critical
      title: ErrorSeverity
      description: Error severity levels for catalog entries.
    libs__python__schemas__log_records__feedback__LikeDislikeRating:
      properties:
        feedback_type:
          type: string
          const: like_dislike
          title: Feedback Type
          default: like_dislike
        value:
          type: boolean
          title: Value
      type: object
      required:
        - value
      title: LikeDislikeRating
    libs__python__schemas__log_records__feedback__StarRating:
      properties:
        feedback_type:
          type: string
          const: star
          title: Feedback Type
          default: star
        value:
          type: integer
          maximum: 5
          minimum: 1
          title: Value
      type: object
      required:
        - value
      title: StarRating
    libs__python__schemas__log_records__feedback__ScoreRating:
      properties:
        feedback_type:
          type: string
          const: score
          title: Feedback Type
          default: score
        value:
          type: integer
          title: Value
      type: object
      required:
        - value
      title: ScoreRating
    libs__python__schemas__log_records__feedback__TagsRating:
      properties:
        feedback_type:
          type: string
          const: tags
          title: Feedback Type
          default: tags
        value:
          items:
            type: string
            maxLength: 255
            minLength: 1
          type: array
          title: Value
      type: object
      required:
        - value
      title: TagsRating
    libs__python__schemas__log_records__feedback__TextRating:
      properties:
        feedback_type:
          type: string
          const: text
          title: Feedback Type
          default: text
        value:
          type: string
          minLength: 1
          title: Value
      type: object
      required:
        - value
      title: TextRating
    LikeDislikeAggregate:
      properties:
        feedback_type:
          type: string
          const: like_dislike
          title: Feedback Type
          default: like_dislike
        like_count:
          type: integer
          title: Like Count
        dislike_count:
          type: integer
          title: Dislike Count
        unrated_count:
          type: integer
          title: Unrated Count
      type: object
      required:
        - like_count
        - dislike_count
        - unrated_count
      title: LikeDislikeAggregate
    StarAggregate:
      properties:
        feedback_type:
          type: string
          const: star
          title: Feedback Type
          default: star
        average:
          type: number
          title: Average
        counts:
          additionalProperties:
            type: integer
          type: object
          title: Counts
        unrated_count:
          type: integer
          title: Unrated Count
      type: object
      required:
        - average
        - counts
        - unrated_count
      title: StarAggregate
    ScoreAggregate:
      properties:
        feedback_type:
          type: string
          const: score
          title: Feedback Type
          default: score
        average:
          type: number
          title: Average
        unrated_count:
          type: integer
          title: Unrated Count
      type: object
      required:
        - average
        - unrated_count
      title: ScoreAggregate
    TagsAggregate:
      properties:
        feedback_type:
          type: string
          const: tags
          title: Feedback Type
          default: tags
        counts:
          additionalProperties:
            type: integer
          type: object
          title: Counts
        unrated_count:
          type: integer
          title: Unrated Count
      type: object
      required:
        - counts
        - unrated_count
      title: TagsAggregate
    TextAggregate:
      properties:
        feedback_type:
          type: string
          const: text
          title: Feedback Type
          default: text
        count:
          type: integer
          title: Count
        unrated_count:
          type: integer
          title: Unrated Count
      type: object
      required:
        - count
        - unrated_count
      title: TextAggregate
    MetricCritiqueContent:
      properties:
        critique:
          type: string
          title: Critique
        intended_value:
          type: boolean
          title: Intended Value
        original_explanation:
          type: string
          title: Original Explanation
      type: object
      required:
        - critique
        - intended_value
        - original_explanation
      title: MetricCritiqueContent
    ToolCallFunction:
      properties:
        name:
          type: string
          title: Name
        arguments:
          type: string
          title: Arguments
      type: object
      required:
        - name
        - arguments
      title: ToolCallFunction
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Galileo-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login
    HTTPBasic:
      type: http
      scheme: basic

````