{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/zigai/pi-tweaks/main/packages/pi-model-alias/model-aliases.schema.json",
  "title": "Pi model and provider aliases",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string"
    },
    "aliases": {
      "type": "array",
      "default": [],
      "description": "Model aliases to expose in Pi model selection and rewrite before provider requests.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["provider", "model", "alias"],
        "properties": {
          "provider": {
            "type": "string",
            "minLength": 1,
            "description": "Provider id for the model to alias."
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "description": "Original provider model id sent to the API."
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "description": "Model id shown to Pi and accepted by model lookup."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "Optional display name. Defaults to the alias id."
          }
        }
      }
    },
    "stableProviderColumn": {
      "type": "boolean",
      "default": true,
      "description": "Align provider names in model selector lists using the longest filtered model name instead of only the currently visible rows."
    },
    "providerAliases": {
      "type": "array",
      "default": [],
      "description": "Provider display names to show in Pi UI while preserving the real provider id.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["provider", "name"],
        "properties": {
          "provider": {
            "type": "string",
            "minLength": 1,
            "description": "Real Pi provider id to display under another name."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "Display name shown for the provider in Pi UI."
          }
        }
      }
    }
  }
}
