{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trajectory/json-schema/trajectory-benchmark-diagnostics-response-schema.json",
  "title": "BenchmarkDiagnosticsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trajectory-diagnostics-api-openapi.yml#/components/schemas/BenchmarkDiagnosticsResponse",
  "properties": {
    "benchmark_diagnostic_id": {
      "type": "string",
      "title": "Benchmark Diagnostic Id"
    },
    "bench_id": {
      "type": "string",
      "title": "Bench Id"
    },
    "eval_run_id": {
      "type": "string",
      "title": "Eval Run Id"
    },
    "base_model_slug": {
      "type": "string",
      "title": "Base Model Slug",
      "description": "Model used for the diagnostic run."
    },
    "status": {
      "type": "string",
      "enum": [
        "completed",
        "failed",
        "cancelled"
      ],
      "title": "Status"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "started_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Started At"
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed At"
    },
    "failure": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Failure",
      "description": "Run-wide failure summary; task errors appear on tasks."
    },
    "task_counts": {
      "$ref": "#/$defs/BenchmarkDiagnosticTaskCounts",
      "description": "Number of tasks by final status."
    },
    "tasks": {
      "items": {
        "$ref": "#/$defs/BenchmarkDiagnosticTask"
      },
      "type": "array",
      "title": "Tasks"
    }
  },
  "type": "object",
  "required": [
    "benchmark_diagnostic_id",
    "bench_id",
    "eval_run_id",
    "base_model_slug",
    "status",
    "created_at",
    "updated_at",
    "started_at",
    "completed_at",
    "failure",
    "task_counts",
    "tasks"
  ],
  "$defs": {
    "BenchmarkDiagnosticTask": {
      "properties": {
        "task_id": {
          "type": "string",
          "title": "Task Id"
        },
        "runtime_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Runtime Id"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "running",
            "completed",
            "failed",
            "cancelled"
          ],
          "title": "Status"
        },
        "failure": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Failure",
          "description": "Failure for this task, including rollout details when available."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "title": "Updated At"
        },
        "started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Started At"
        },
        "completed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Completed At"
        }
      },
      "type": "object",
      "required": [
        "task_id",
        "runtime_id",
        "status",
        "failure",
        "created_at",
        "updated_at",
        "started_at",
        "completed_at"
      ],
      "title": "BenchmarkDiagnosticTask"
    },
    "BenchmarkDiagnosticTaskCounts": {
      "properties": {
        "completed": {
          "type": "integer",
          "title": "Completed"
        },
        "failed": {
          "type": "integer",
          "title": "Failed"
        },
        "cancelled": {
          "type": "integer",
          "title": "Cancelled"
        }
      },
      "type": "object",
      "required": [
        "completed",
        "failed",
        "cancelled"
      ],
      "title": "BenchmarkDiagnosticTaskCounts"
    }
  }
}