{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://omniakey.com/downloads/gpt-5-6-codex-kit/v1/report.schema.json",
  "title": "GPT-5.6 Codex compatibility report",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "kit",
    "generated_at",
    "endpoint",
    "configuration",
    "environment",
    "checks",
    "summary",
    "overall_status"
  ],
  "properties": {
    "schema_version": { "const": "1.0" },
    "kit": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name", "version"],
      "properties": {
        "name": { "const": "gpt-5.6-codex-compatibility-kit" },
        "version": { "type": "string", "minLength": 1 }
      }
    },
    "generated_at": { "type": "string", "format": "date-time" },
    "endpoint": { "type": "string", "format": "uri" },
    "configuration": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "base_path",
        "codex_timeout_ms",
        "codex_mode",
        "full",
        "models",
        "retries",
        "timeout_ms"
      ],
      "properties": {
        "base_path": { "type": "string", "pattern": "^/" },
        "codex_timeout_ms": { "type": "integer", "minimum": 5000, "maximum": 300000 },
        "codex_mode": { "enum": ["skipped", "one-model", "all-models"] },
        "full": { "type": "boolean" },
        "models": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": { "$ref": "#/$defs/model_id" }
        },
        "retries": {
          "type": "object",
          "additionalProperties": false,
          "required": ["api", "codex_request", "codex_stream"],
          "properties": {
            "api": { "const": 0 },
            "codex_request": { "const": 0 },
            "codex_stream": { "const": 0 }
          }
        },
        "timeout_ms": { "type": "integer", "minimum": 1000, "maximum": 120000 }
      }
    },
    "environment": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "architecture",
        "codex_passthrough_env",
        "codex_version",
        "node_version",
        "platform"
      ],
      "properties": {
        "architecture": { "type": "string", "minLength": 1 },
        "codex_passthrough_env": {
          "type": "array",
          "uniqueItems": true,
          "items": { "type": "string", "minLength": 1 }
        },
        "codex_version": { "$ref": "#/$defs/nullable_string" },
        "node_version": { "type": "string", "pattern": "^v[0-9]+" },
        "platform": { "type": "string", "minLength": 1 }
      }
    },
    "checks": {
      "type": "array",
      "minItems": 1,
      "items": { "$ref": "#/$defs/check" }
    },
    "summary": {
      "type": "object",
      "additionalProperties": false,
      "required": ["passed", "failed", "skipped"],
      "properties": {
        "passed": { "type": "integer", "minimum": 0 },
        "failed": { "type": "integer", "minimum": 0 },
        "skipped": { "type": "integer", "minimum": 0 }
      }
    },
    "overall_status": { "enum": ["pass", "fail"] }
  },
  "allOf": [
    {
      "if": {
        "properties": { "overall_status": { "const": "pass" } },
        "required": ["overall_status"]
      },
      "then": {
        "properties": {
          "summary": {
            "type": "object",
            "properties": { "failed": { "const": 0 } },
            "required": ["failed"]
          }
        }
      }
    },
    {
      "if": {
        "properties": { "overall_status": { "const": "fail" } },
        "required": ["overall_status"]
      },
      "then": {
        "properties": {
          "summary": {
            "type": "object",
            "properties": { "failed": { "type": "integer", "minimum": 1 } },
            "required": ["failed"]
          }
        }
      }
    }
  ],
  "$defs": {
    "model_id": {
      "enum": ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"]
    },
    "nullable_string": { "type": ["string", "null"] },
    "error": {
      "type": "object",
      "additionalProperties": false,
      "required": ["category", "code", "message", "param", "type"],
      "properties": {
        "category": { "type": "string", "minLength": 1 },
        "code": { "$ref": "#/$defs/nullable_string" },
        "message": { "type": "string", "minLength": 1, "maxLength": 2000 },
        "param": { "$ref": "#/$defs/nullable_string" },
        "type": { "$ref": "#/$defs/nullable_string" }
      }
    },
    "usage": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "input_tokens",
        "output_tokens",
        "total_tokens",
        "cached_tokens",
        "cache_write_tokens",
        "reasoning_tokens"
      ],
      "properties": {
        "input_tokens": { "$ref": "#/$defs/token_count" },
        "output_tokens": { "$ref": "#/$defs/token_count" },
        "total_tokens": { "$ref": "#/$defs/token_count" },
        "cached_tokens": { "$ref": "#/$defs/token_count" },
        "cache_write_tokens": { "$ref": "#/$defs/token_count" },
        "reasoning_tokens": { "$ref": "#/$defs/token_count" }
      }
    },
    "token_count": {
      "type": ["integer", "null"],
      "minimum": 0
    },
    "response_headers": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "x-request-id": { "type": "string" },
        "x-openai-request-id": { "type": "string" },
        "x-oneapi-request-id": { "type": "string" },
        "retry-after": { "type": "string" },
        "x-ratelimit-limit-requests": { "type": "string" },
        "x-ratelimit-remaining-requests": { "type": "string" },
        "x-ratelimit-reset-requests": { "type": "string" },
        "x-ratelimit-limit-tokens": { "type": "string" },
        "x-ratelimit-remaining-tokens": { "type": "string" },
        "x-ratelimit-reset-tokens": { "type": "string" }
      }
    },
    "check": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "layer", "model", "status"],
      "properties": {
        "id": {
          "enum": [
            "models_endpoint",
            "model_access",
            "responses_text",
            "responses_stream",
            "responses_function_tool",
            "codex_cli_smoke"
          ]
        },
        "layer": { "enum": ["api", "codex"] },
        "model": {
          "anyOf": [{ "$ref": "#/$defs/model_id" }, { "type": "null" }]
        },
        "status": { "enum": ["pass", "fail", "skip"] },
        "reason": { "type": "string", "minLength": 1 },
        "duration_ms": { "type": "integer", "minimum": 0 },
        "http_status": { "type": "integer", "minimum": 100, "maximum": 599 },
        "reported_model": { "$ref": "#/$defs/nullable_string" },
        "response_headers": { "$ref": "#/$defs/response_headers" },
        "response_id": { "$ref": "#/$defs/nullable_string" },
        "usage": {
          "anyOf": [{ "$ref": "#/$defs/usage" }, { "type": "null" }]
        },
        "output_verified": { "type": "boolean" },
        "model_verified": { "type": "boolean" },
        "content_type": { "$ref": "#/$defs/nullable_string" },
        "content_type_verified": { "type": "boolean" },
        "completed_event": { "type": "boolean" },
        "terminal_completed_event": { "type": "boolean" },
        "event_count": { "type": "integer", "minimum": 0 },
        "delta_event_count": { "type": "integer", "minimum": 0 },
        "call_name_verified": { "type": "boolean" },
        "arguments_verified": { "type": "boolean" },
        "codex_version": { "$ref": "#/$defs/nullable_string" },
        "exit_code": { "type": ["integer", "null"] },
        "signal": { "$ref": "#/$defs/nullable_string" },
        "timed_out": { "type": "boolean" },
        "unexpected_item_detected": { "type": "boolean" },
        "error": { "$ref": "#/$defs/error" }
      },
      "allOf": [
        {
          "if": {
            "properties": { "status": { "const": "fail" } },
            "required": ["status"]
          },
          "then": {
            "anyOf": [
              { "properties": { "error": {} }, "required": ["error"] },
              { "properties": { "reason": {} }, "required": ["reason"] }
            ]
          }
        },
        {
          "if": {
            "properties": { "status": { "const": "skip" } },
            "required": ["status"]
          },
          "then": { "properties": { "reason": {} }, "required": ["reason"] }
        }
      ]
    }
  }
}
