{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/opper/main/json-schema/opper-roundtable-response-schema.json",
  "title": "RoundtableResponse",
  "x-generated": "2026-10-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/opper-openapi.json#/components/schemas/RoundtableResponse",
  "properties": {
    "data": {
      "description": "Final consolidated output. Null in fast mode (no consolidation runs).",
      "type": "string"
    },
    "id": {
      "description": "Stable identifier for this roundtable call.",
      "type": "string"
    },
    "meta": {
      "description": "Aggregated call metadata.",
      "properties": {
        "models_used": {
          "description": "Names of the models queried in parallel.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "resolution": {
          "description": "Resolution mode that produced this response (summary / fast / multiple_choice).",
          "type": "string"
        },
        "summary_model": {
          "description": "Model used for the consolidation call. Only set in summary mode.",
          "type": "string"
        },
        "summary_usage": {
          "description": "Token counts for the consolidation call aggregated across retries.",
          "properties": {
            "cache_creation_1h_tokens": {
              "type": "integer"
            },
            "cache_creation_tokens": {
              "type": "integer"
            },
            "cache_read_tokens": {
              "type": "integer"
            },
            "code_interpreter_sessions": {
              "type": "integer"
            },
            "extra": {
              "type": "object"
            },
            "file_search_calls": {
              "type": "integer"
            },
            "google_search_prompts": {
              "type": "integer"
            },
            "google_search_queries": {
              "type": "integer"
            },
            "image_generation_calls": {
              "type": "integer"
            },
            "input_audio_tokens": {
              "type": "integer"
            },
            "input_image_tokens": {
              "type": "integer"
            },
            "input_tokens": {
              "type": "integer"
            },
            "output_audio_tokens": {
              "type": "integer"
            },
            "output_image_tokens": {
              "type": "integer"
            },
            "output_tokens": {
              "type": "integer"
            },
            "reasoning_tokens": {
              "type": "integer"
            },
            "service_tier": {
              "type": "string"
            },
            "url_context_requests": {
              "type": "integer"
            },
            "web_fetch_requests": {
              "type": "integer"
            },
            "web_search_calls": {
              "type": "integer"
            },
            "web_search_requests": {
              "type": "integer"
            },
            "x_search_calls": {
              "type": "integer"
            }
          },
          "required": [
            "input_tokens",
            "output_tokens"
          ],
          "type": "object"
        },
        "total_cost": {
          "description": "USD cost summed across all fan-out models and the consolidation call.",
          "type": "number"
        },
        "total_duration_ms": {
          "description": "End-to-end request duration in milliseconds.",
          "type": "integer"
        },
        "trace_uuid": {
          "description": "UUID of the trace span for this roundtable call.",
          "type": "string"
        }
      },
      "required": [
        "resolution",
        "models_used",
        "total_cost",
        "total_duration_ms"
      ],
      "type": "object"
    },
    "model_results": {
      "description": "Per-model fan-out results in the order they appeared in the request.",
      "items": {
        "properties": {
          "cost": {
            "description": "USD cost for this model call summed across retries.",
            "type": "number"
          },
          "data": {
            "description": "Raw model output. When output_schema is supplied this is a JSON string that validated against the schema.",
            "type": "string"
          },
          "duration_ms": {
            "description": "Wall-clock time for this model call in milliseconds including retries.",
            "type": "integer"
          },
          "error": {
            "description": "Provider or transport error message. Empty on success.",
            "type": "string"
          },
          "index": {
            "description": "Position of this model in the request's models array (0-based).",
            "type": "integer"
          },
          "model": {
            "description": "Name of the model that produced this result.",
            "type": "string"
          },
          "schema_error": {
            "description": "Why the output failed schema validation. Empty when schema_valid is true or absent.",
            "type": "string"
          },
          "schema_valid": {
            "description": "Whether the model's output validated against the request's output_schema. Absent when no output_schema was supplied.",
            "type": "boolean"
          },
          "usage": {
            "description": "Token counts aggregated across all retry attempts.",
            "properties": {
              "cache_creation_1h_tokens": {
                "type": "integer"
              },
              "cache_creation_tokens": {
                "type": "integer"
              },
              "cache_read_tokens": {
                "type": "integer"
              },
              "code_interpreter_sessions": {
                "type": "integer"
              },
              "extra": {
                "type": "object"
              },
              "file_search_calls": {
                "type": "integer"
              },
              "google_search_prompts": {
                "type": "integer"
              },
              "google_search_queries": {
                "type": "integer"
              },
              "image_generation_calls": {
                "type": "integer"
              },
              "input_audio_tokens": {
                "type": "integer"
              },
              "input_image_tokens": {
                "type": "integer"
              },
              "input_tokens": {
                "type": "integer"
              },
              "output_audio_tokens": {
                "type": "integer"
              },
              "output_image_tokens": {
                "type": "integer"
              },
              "output_tokens": {
                "type": "integer"
              },
              "reasoning_tokens": {
                "type": "integer"
              },
              "service_tier": {
                "type": "string"
              },
              "url_context_requests": {
                "type": "integer"
              },
              "web_fetch_requests": {
                "type": "integer"
              },
              "web_search_calls": {
                "type": "integer"
              },
              "web_search_requests": {
                "type": "integer"
              },
              "x_search_calls": {
                "type": "integer"
              }
            },
            "required": [
              "input_tokens",
              "output_tokens"
            ],
            "type": "object"
          }
        },
        "required": [
          "index",
          "model",
          "data",
          "duration_ms"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "data",
    "meta",
    "model_results"
  ],
  "type": "object"
}