{
  "$defs": {
    "AssistantMessage": {
      "properties": {
        "role": {
          "const": "assistant",
          "title": "Role",
          "type": "string"
        },
        "content": {
          "default": "",
          "title": "Content",
          "type": "string"
        },
        "tool_calls": {
          "default": [],
          "items": {
            "$ref": "#/$defs/EvalToolCall"
          },
          "title": "Tool Calls",
          "type": "array"
        },
        "audio": {
          "anyOf": [
            {
              "$ref": "#/$defs/EvalAudio"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The assistant's recorded audio"
        }
      },
      "required": [
        "role"
      ],
      "title": "AssistantMessage",
      "type": "object"
    },
    "DryRunSource": {
      "properties": {
        "kind": {
          "const": "test",
          "default": "test",
          "title": "Kind",
          "type": "string"
        }
      },
      "title": "DryRunSource",
      "type": "object"
    },
    "EvalAudio": {
      "description": "A turn's recorded audio, which the voice scorers measure. Model calls never send it.",
      "properties": {
        "data_url": {
          "description": "The recording as a base64 data:audio/wav URL, 16-bit PCM",
          "title": "Data Url",
          "type": "string"
        },
        "start_time": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Seconds from the start of the conversation to the start of this turn",
          "title": "Start Time"
        }
      },
      "required": [
        "data_url"
      ],
      "title": "EvalAudio",
      "type": "object"
    },
    "EvalTool": {
      "description": "A function the model may call in agent mode, in the OpenAI function shape.",
      "properties": {
        "name": {
          "minLength": 1,
          "title": "Name",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        },
        "parameters": {
          "additionalProperties": {
            "$ref": "#/$defs/JsonValue"
          },
          "title": "Parameters",
          "type": "object"
        }
      },
      "required": [
        "name"
      ],
      "title": "EvalTool",
      "type": "object"
    },
    "EvalToolCall": {
      "properties": {
        "id": {
          "minLength": 1,
          "title": "Id",
          "type": "string"
        },
        "name": {
          "minLength": 1,
          "title": "Name",
          "type": "string"
        },
        "arguments": {
          "additionalProperties": {
            "$ref": "#/$defs/JsonValue"
          },
          "title": "Arguments",
          "type": "object"
        }
      },
      "required": [
        "id",
        "name",
        "arguments"
      ],
      "title": "EvalToolCall",
      "type": "object"
    },
    "ExpectedToolCall": {
      "properties": {
        "name": {
          "minLength": 1,
          "title": "Name",
          "type": "string"
        },
        "arguments": {
          "anyOf": [
            {
              "additionalProperties": {
                "$ref": "#/$defs/JsonValue"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Arguments"
        }
      },
      "required": [
        "name"
      ],
      "title": "ExpectedToolCall",
      "type": "object"
    },
    "JsonValue": {},
    "OnlineSource": {
      "description": "A live request an online rule sampled. Its item carries the request's conversation and ``output`` the reply\nthe caller received, after the gateway's own logging redaction, and nothing at all is sent for a request whose\nmessages are redacted from logging.",
      "properties": {
        "kind": {
          "const": "online",
          "default": "online",
          "title": "Kind",
          "type": "string"
        },
        "rule_id": {
          "title": "Rule Id",
          "type": "string"
        },
        "request_id": {
          "title": "Request Id",
          "type": "string"
        }
      },
      "required": [
        "rule_id",
        "request_id"
      ],
      "title": "OnlineSource",
      "type": "object"
    },
    "RunSource": {
      "properties": {
        "kind": {
          "const": "run",
          "default": "run",
          "title": "Kind",
          "type": "string"
        },
        "run_id": {
          "title": "Run Id",
          "type": "string"
        }
      },
      "required": [
        "run_id"
      ],
      "title": "RunSource",
      "type": "object"
    },
    "ScheduleSource": {
      "properties": {
        "kind": {
          "const": "schedule",
          "default": "schedule",
          "title": "Kind",
          "type": "string"
        },
        "run_id": {
          "title": "Run Id",
          "type": "string"
        },
        "schedule_id": {
          "title": "Schedule Id",
          "type": "string"
        }
      },
      "required": [
        "run_id",
        "schedule_id"
      ],
      "title": "ScheduleSource",
      "type": "object"
    },
    "SystemMessage": {
      "properties": {
        "role": {
          "const": "system",
          "title": "Role",
          "type": "string"
        },
        "content": {
          "title": "Content",
          "type": "string"
        }
      },
      "required": [
        "role",
        "content"
      ],
      "title": "SystemMessage",
      "type": "object"
    },
    "ToolMessage": {
      "properties": {
        "role": {
          "const": "tool",
          "title": "Role",
          "type": "string"
        },
        "tool_call_id": {
          "minLength": 1,
          "title": "Tool Call Id",
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "content": {
          "title": "Content",
          "type": "string"
        }
      },
      "required": [
        "role",
        "tool_call_id",
        "content"
      ],
      "title": "ToolMessage",
      "type": "object"
    },
    "UserMessage": {
      "properties": {
        "role": {
          "const": "user",
          "title": "Role",
          "type": "string"
        },
        "content": {
          "title": "Content",
          "type": "string"
        },
        "images": {
          "default": [],
          "description": "Images sent with the message, as URLs",
          "items": {
            "type": "string"
          },
          "title": "Images",
          "type": "array"
        },
        "audio": {
          "anyOf": [
            {
              "$ref": "#/$defs/EvalAudio"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The user's recorded audio for this turn"
        }
      },
      "required": [
        "role",
        "content"
      ],
      "title": "UserMessage",
      "type": "object"
    },
    "WireItem": {
      "properties": {
        "item_id": {
          "title": "Item Id",
          "type": "string"
        },
        "input": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "discriminator": {
                  "mapping": {
                    "assistant": "#/$defs/AssistantMessage",
                    "system": "#/$defs/SystemMessage",
                    "tool": "#/$defs/ToolMessage",
                    "user": "#/$defs/UserMessage"
                  },
                  "propertyName": "role"
                },
                "oneOf": [
                  {
                    "$ref": "#/$defs/SystemMessage"
                  },
                  {
                    "$ref": "#/$defs/UserMessage"
                  },
                  {
                    "$ref": "#/$defs/AssistantMessage"
                  },
                  {
                    "$ref": "#/$defs/ToolMessage"
                  }
                ]
              },
              "type": "array"
            }
          ],
          "title": "Input"
        },
        "expected": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Expected"
        },
        "context": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Context"
        },
        "retrieval_context": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Retrieval Context"
        },
        "tools": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/EvalTool"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tools"
        },
        "expected_tool_calls": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ExpectedToolCall"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Expected Tool Calls"
        },
        "expected_outcome": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Expected Outcome"
        },
        "metadata": {
          "anyOf": [
            {
              "additionalProperties": {
                "$ref": "#/$defs/JsonValue"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Metadata"
        }
      },
      "required": [
        "item_id",
        "input"
      ],
      "title": "WireItem",
      "type": "object"
    },
    "WireScorer": {
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "revision": {
          "title": "Revision",
          "type": "integer"
        }
      },
      "required": [
        "id",
        "name",
        "revision"
      ],
      "title": "WireScorer",
      "type": "object"
    }
  },
  "description": "What one (item, model) delivery sends. ``output`` is the model's reply, the final assistant reply for a\nconversation.",
  "properties": {
    "version": {
      "const": "1",
      "default": "1",
      "title": "Version",
      "type": "string"
    },
    "scorer": {
      "$ref": "#/$defs/WireScorer"
    },
    "params": {
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      },
      "title": "Params",
      "type": "object"
    },
    "item": {
      "$ref": "#/$defs/WireItem"
    },
    "model": {
      "title": "Model",
      "type": "string"
    },
    "output": {
      "title": "Output",
      "type": "string"
    },
    "source": {
      "discriminator": {
        "mapping": {
          "online": "#/$defs/OnlineSource",
          "run": "#/$defs/RunSource",
          "schedule": "#/$defs/ScheduleSource",
          "test": "#/$defs/DryRunSource"
        },
        "propertyName": "kind"
      },
      "oneOf": [
        {
          "$ref": "#/$defs/RunSource"
        },
        {
          "$ref": "#/$defs/ScheduleSource"
        },
        {
          "$ref": "#/$defs/DryRunSource"
        },
        {
          "$ref": "#/$defs/OnlineSource"
        }
      ],
      "title": "Source"
    }
  },
  "required": [
    "scorer",
    "params",
    "item",
    "model",
    "output",
    "source"
  ],
  "title": "RemoteScoreRequest",
  "type": "object"
}
