{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Model",
  "title": "Model",
  "properties": {
    "handle": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Handle",
      "description": "The handle for this config, in the format provider/model-name."
    },
    "name": {
      "type": "string",
      "title": "Name",
      "description": "The actual model name used by the provider"
    },
    "display_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Display Name",
      "description": "A human-friendly display name for the model."
    },
    "provider_type": {
      "$ref": "#/components/schemas/ProviderType",
      "description": "The type of the provider"
    },
    "provider_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Provider Name",
      "description": "The provider name for the model."
    },
    "model_type": {
      "type": "string",
      "const": "llm",
      "title": "Model Type",
      "description": "Type of model (llm or embedding)",
      "default": "llm"
    },
    "model": {
      "type": "string",
      "title": "Model",
      "description": "Deprecated: Use 'name' field instead. LLM model name.",
      "deprecated": true
    },
    "model_endpoint_type": {
      "type": "string",
      "enum": [
        "openai",
        "anthropic",
        "google_ai",
        "google_vertex",
        "azure",
        "groq",
        "ollama",
        "webui",
        "webui-legacy",
        "lmstudio",
        "lmstudio-legacy",
        "lmstudio-chatcompletions",
        "llamacpp",
        "koboldcpp",
        "vllm",
        "hugging-face",
        "baseten",
        "minimax",
        "mistral",
        "together",
        "bedrock",
        "deepseek",
        "xai",
        "zai",
        "zai_coding",
        "openrouter",
        "chatgpt_oauth"
      ],
      "title": "Model Endpoint Type",
      "description": "Deprecated: Use 'provider_type' field instead. The endpoint type for the model.",
      "deprecated": true
    },
    "model_endpoint": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Endpoint",
      "description": "Deprecated: The endpoint for the model.",
      "deprecated": true
    },
    "provider_category": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/ProviderCategory"
        },
        {
          "type": "null"
        }
      ],
      "description": "Deprecated: The provider category for the model.",
      "deprecated": true
    },
    "model_wrapper": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Wrapper",
      "description": "Deprecated: The wrapper for the model.",
      "deprecated": true
    },
    "context_window": {
      "type": "integer",
      "title": "Context Window",
      "description": "Deprecated: Use 'max_context_window' field instead. The context window size for the model.",
      "deprecated": true
    },
    "put_inner_thoughts_in_kwargs": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Put Inner Thoughts In Kwargs",
      "description": "Deprecated: Puts 'inner_thoughts' as a kwarg in the function call.",
      "default": true,
      "deprecated": true
    },
    "temperature": {
      "type": "number",
      "title": "Temperature",
      "description": "Deprecated: The temperature to use when generating text with the model.",
      "default": 0.7,
      "deprecated": true
    },
    "max_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Tokens",
      "description": "Deprecated: The maximum number of tokens to generate.",
      "deprecated": true
    },
    "enable_reasoner": {
      "type": "boolean",
      "title": "Enable Reasoner",
      "description": "Deprecated: Whether or not the model should use extended thinking if it is a 'reasoning' style model.",
      "default": true,
      "deprecated": true
    },
    "reasoning_effort": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "none",
            "minimal",
            "low",
            "medium",
            "high",
            "xhigh"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Reasoning Effort",
      "description": "Deprecated: The reasoning effort to use when generating text reasoning models.",
      "deprecated": true
    },
    "max_reasoning_tokens": {
      "type": "integer",
      "title": "Max Reasoning Tokens",
      "description": "Deprecated: Configurable thinking budget for extended thinking.",
      "default": 0,
      "deprecated": true
    },
    "effort": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "max"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Effort",
      "description": "The effort level for Anthropic models that support it (Opus 4.5, Opus 4.6). Controls token spending and thinking behavior. Not setting this gives similar performance to 'high'."
    },
    "frequency_penalty": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Frequency Penalty",
      "description": "Deprecated: Positive values penalize new tokens based on their existing frequency in the text so far.",
      "deprecated": true
    },
    "compatibility_type": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "gguf",
            "mlx"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Compatibility Type",
      "description": "Deprecated: The framework compatibility type for the model.",
      "deprecated": true
    },
    "verbosity": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Verbosity",
      "description": "Deprecated: Soft control for how verbose model output should be.",
      "deprecated": true
    },
    "tier": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tier",
      "description": "Deprecated: The cost tier for the model (cloud only).",
      "deprecated": true
    },
    "parallel_tool_calls": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Parallel Tool Calls",
      "description": "Deprecated: If set to True, enables parallel tool calling.",
      "default": false,
      "deprecated": true
    },
    "response_format": {
      "anyOf": [
        {
          "oneOf": [
            {
              "$ref": "#/components/schemas/TextResponseFormat"
            },
            {
              "$ref": "#/components/schemas/JsonSchemaResponseFormat"
            },
            {
              "$ref": "#/components/schemas/JsonObjectResponseFormat"
            }
          ],
          "discriminator": {
            "propertyName": "type",
            "mapping": {
              "json_object": "#/components/schemas/JsonObjectResponseFormat",
              "json_schema": "#/components/schemas/JsonSchemaResponseFormat",
              "text": "#/components/schemas/TextResponseFormat"
            }
          }
        },
        {
          "type": "null"
        }
      ],
      "title": "Response Format",
      "description": "The response format for the model's output. Supports text, json_object, and json_schema (structured outputs). Can be set via model_settings."
    },
    "strict": {
      "type": "boolean",
      "title": "Strict",
      "description": "Enable strict mode for tool calling. When true, tool schemas include strict: true and additionalProperties: false, guaranteeing tool outputs match JSON schemas.",
      "default": false
    },
    "return_logprobs": {
      "type": "boolean",
      "title": "Return Logprobs",
      "description": "Whether to return log probabilities of the output tokens. Useful for RL training.",
      "default": false
    },
    "top_logprobs": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Top Logprobs",
      "description": "Number of most likely tokens to return at each position (0-20). Requires return_logprobs=True."
    },
    "return_token_ids": {
      "type": "boolean",
      "title": "Return Token Ids",
      "description": "Whether to return token IDs for all LLM generations via SGLang native endpoint. Required for multi-turn RL training with loss masking. Only works with SGLang provider.",
      "default": false
    },
    "tool_call_parser": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tool Call Parser",
      "description": "SGLang tool call parser name (e.g. 'glm47', 'qwen25', 'hermes'). Used by the SGLang native adapter to parse tool calls from raw model output."
    },
    "max_context_window": {
      "type": "integer",
      "title": "Max Context Window",
      "description": "The maximum context window for the model"
    }
  },
  "type": "object",
  "required": [
    "name",
    "provider_type",
    "model",
    "model_endpoint_type",
    "context_window",
    "max_context_window"
  ]
}