{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://glm52.ai/data/glm-5-2-benchmark/run-schema.json",
  "title": "GLM52.ai model benchmark run record",
  "type": "object",
  "required": [
    "run_id",
    "prompt_id",
    "started_at",
    "model_id",
    "provider",
    "endpoint_class",
    "harness",
    "parameters",
    "fixture_revision",
    "result",
    "raw_output_path"
  ],
  "properties": {
    "run_id": { "type": "string", "minLength": 1 },
    "prompt_id": { "type": "string", "minLength": 1 },
    "started_at": { "type": "string", "format": "date-time" },
    "model_id": { "type": "string", "minLength": 1 },
    "model_revision": { "type": ["string", "null"] },
    "provider": { "type": "string", "minLength": 1 },
    "endpoint_class": { "enum": ["general_api", "coding_plan", "third_party_api", "self_hosted"] },
    "harness": {
      "type": "object",
      "required": ["name", "version"],
      "properties": {
        "name": { "type": "string" },
        "version": { "type": "string" },
        "agent": { "type": ["string", "null"] },
        "agent_version": { "type": ["string", "null"] }
      },
      "additionalProperties": true
    },
    "parameters": { "type": "object" },
    "fixture_revision": { "type": "string", "minLength": 1 },
    "permissions": { "type": "array", "items": { "type": "string" } },
    "retries": { "type": "integer", "minimum": 0 },
    "usage": {
      "type": "object",
      "properties": {
        "input_tokens": { "type": ["integer", "null"], "minimum": 0 },
        "cached_tokens": { "type": ["integer", "null"], "minimum": 0 },
        "output_tokens": { "type": ["integer", "null"], "minimum": 0 },
        "cost_usd": { "type": ["number", "null"], "minimum": 0 },
        "ttft_ms": { "type": ["number", "null"], "minimum": 0 },
        "wall_time_ms": { "type": ["number", "null"], "minimum": 0 }
      },
      "additionalProperties": false
    },
    "result": {
      "type": "object",
      "required": ["passed", "grader"],
      "properties": {
        "passed": { "type": "boolean" },
        "grader": { "type": "string" },
        "score": { "type": ["number", "null"] },
        "notes": { "type": ["string", "null"] }
      },
      "additionalProperties": true
    },
    "raw_output_path": { "type": "string", "minLength": 1 },
    "error": { "type": ["object", "null"] }
  },
  "additionalProperties": false
}
