{
  "$schema": "https://modelparams.dev/api/v1/schema.json",
  "provider": "z-ai",
  "authType": "subscription",
  "model": "glm-5.2",
  "params": [
    {
      "path": "max_tokens",
      "label": "Max tokens",
      "description": "Maximum number of tokens to generate in the response.",
      "group": "generation_length",
      "type": "integer",
      "default": 65536,
      "range": {
        "min": 1,
        "max": 131072
      }
    },
    {
      "path": "temperature",
      "label": "Temperature",
      "description": "Controls randomness. Lower values make outputs more focused; higher values make them more varied.",
      "group": "sampling",
      "applicability": {
        "except": {
          "do_sample": false
        }
      },
      "type": "number",
      "default": 1,
      "range": {
        "min": 0,
        "max": 1,
        "step": 0.1
      }
    },
    {
      "path": "top_p",
      "label": "Top P",
      "description": "Controls nucleus sampling by limiting generation to tokens within the selected cumulative probability.",
      "group": "sampling",
      "applicability": {
        "except": {
          "do_sample": false
        }
      },
      "type": "number",
      "default": 0.95,
      "range": {
        "min": 0.01,
        "max": 1,
        "step": 0.01
      }
    },
    {
      "path": "do_sample",
      "label": "Do sample",
      "description": "When false, the model uses greedy decoding and ignores temperature and top_p.",
      "group": "sampling",
      "type": "boolean",
      "default": true
    },
    {
      "path": "thinking.type",
      "label": "Thinking mode",
      "description": "Toggles the model's extended reasoning before it produces the final answer.",
      "group": "reasoning",
      "type": "enum",
      "default": "enabled",
      "values": [
        "enabled",
        "disabled"
      ]
    },
    {
      "path": "reasoning_effort",
      "label": "Reasoning effort",
      "description": "Controls how much reasoning effort GLM-5.2 spends when thinking is enabled.",
      "group": "reasoning",
      "applicability": {
        "only": {
          "thinking.type": "enabled"
        }
      },
      "type": "enum",
      "default": "max",
      "values": [
        "none",
        "minimal",
        "low",
        "medium",
        "high",
        "xhigh",
        "max"
      ]
    },
    {
      "path": "response_format.type",
      "label": "Response format",
      "description": "Forces the response into plain text or a JSON object.",
      "group": "output_format",
      "type": "enum",
      "default": "text",
      "values": [
        "text",
        "json_object"
      ]
    }
  ]
}
