{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:awoooi:agent-nemotron-external-result-v1",
  "title": "AWOOOI NeMo/Nemotron External Replay Result (v1)",
  "type": "object",
  "required": [
    "schema_version",
    "run_id",
    "incident_id",
    "model_output"
  ],
  "properties": {
    "schema_version": {
      "type": "string",
      "const": "agent_nemotron_external_result_v1"
    },
    "run_id": {
      "type": "string",
      "minLength": 1
    },
    "incident_id": {
      "type": "string",
      "minLength": 1
    },
    "model": {
      "type": "string"
    },
    "candidate_variant_id": {
      "type": "string"
    },
    "model_output": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "string"
        }
      ]
    },
    "latency_ms": {
      "type": "number",
      "minimum": 0
    },
    "cost_usd": {
      "type": "number",
      "minimum": 0
    },
    "fallback_used": {
      "type": "boolean"
    },
    "retry_used": {
      "type": "boolean"
    },
    "first_error": {
      "type": ["string", "null"]
    },
    "trace_complete": {
      "type": "boolean"
    },
    "trace_events": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "error": {
      "type": ["string", "null"]
    }
  },
  "additionalProperties": false
}
