{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pipeshub/json-schema/pipeshub-get-models-by-type-response-schema.json",
  "title": "GetModelsByTypeResponse",
  "description": "Success response from getModelsByType. Returns stored provider entries\nfor a single model type bucket (not the flattened available-models shape).\nEach entry's `configuration` includes only `model`, `modelFriendlyName`,\nand `dimensions` when stored.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pipeshub-ai-models-providers-api-openapi.yml#/components/schemas/GetModelsByTypeResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "status",
    "models",
    "message"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "success"
      ]
    },
    "message": {
      "type": "string",
      "description": "Human-readable summary (e.g. \"Found 2 llm models\", \"No llm models found\")."
    },
    "models": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AIModelProviderConfig"
      }
    }
  },
  "$defs": {
    "AIModelProviderConfig": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "configuration"
      ],
      "properties": {
        "provider": {
          "type": "string",
          "description": "AI provider name"
        },
        "configuration": {
          "$ref": "#/$defs/AIModelProviderConfiguration"
        },
        "modelFriendlyName": {
          "type": "string",
          "description": "Display name for this model entry. May duplicate configuration.modelFriendlyName\nwhen set on the stored provider record.\n"
        },
        "isMultimodal": {
          "type": "boolean",
          "default": false,
          "description": "Whether the model supports multimodal input"
        },
        "isReasoning": {
          "type": "boolean",
          "default": false,
          "description": "Whether the model supports reasoning"
        },
        "isDefault": {
          "type": "boolean",
          "default": false,
          "description": "Whether this should be the default model"
        },
        "contextLength": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Context length for the model"
        },
        "modelKey": {
          "type": "string",
          "description": "Unique identifier for this model configuration",
          "readOnly": true
        }
      }
    },
    "AIModelProviderConfiguration": {
      "type": "object",
      "description": "Provider-specific configuration stored on each AI model entry.\n\n**Read shape:** user-facing GET responses return only `model`,\n`modelFriendlyName`, and `dimensions` (when stored). Values are copied as-is;\nother keys including credentials are omitted.\n\n**Write shape:** create and update still accept the full provider payload\n(Zod `configurationSchema` with `.passthrough()`). An omitted key retains\nthe stored value; send an empty string to clear one.\n\nProperties below are the documented union of the Zod base shape and registry-defined\nconfiguration keys (all optional unless required by a given provider at runtime).\n",
      "additionalProperties": false,
      "properties": {
        "model": {
          "type": "string",
          "description": "Model name/identifier. May be comma-separated for multiple models\n(e.g. `gpt-5.6-luna, gpt-5.6-terra`).\n"
        },
        "modelFriendlyName": {
          "type": "string",
          "description": "Display name for the model. Only allowed when `model` is a single name\n(not comma-separated).\n"
        },
        "apiKey": {
          "type": "string",
          "description": "API key for the provider"
        },
        "endpoint": {
          "type": "string",
          "description": "Custom endpoint URL (Azure OpenAI, self-hosted, Wispr override)"
        },
        "organizationId": {
          "type": "string",
          "description": "Organization ID (OpenAI)"
        },
        "deploymentName": {
          "type": "string",
          "description": "Deployment name (Azure OpenAI)"
        },
        "provider": {
          "type": "string",
          "description": "Bedrock model vendor (e.g. anthropic, cohere) or provider name override"
        },
        "customProvider": {
          "type": "string",
          "description": "Custom Bedrock vendor name when `provider` is `other`"
        },
        "awsAccessKeyId": {
          "type": "string",
          "description": "AWS access key (Bedrock). Optional - omit to use IAM role credentials."
        },
        "awsAccessSecretKey": {
          "type": "string",
          "description": "AWS secret key (Bedrock). Optional - omit to use IAM role credentials."
        },
        "region": {
          "type": "string",
          "description": "AWS region (Bedrock)"
        },
        "project": {
          "type": "string",
          "description": "GCP project ID (Vertex AI)"
        },
        "location": {
          "type": "string",
          "description": "Vertex AI region (e.g. us-central1)"
        },
        "serviceAccountJson": {
          "type": "string",
          "description": "Google Cloud service account JSON key (Vertex AI). Uploaded as a string;\ntreated as a secret at runtime.\n"
        },
        "dimensions": {
          "description": "Embedding output dimensions override (when supported by the model).\nStored configs may use an empty string when unset (registry default).\n",
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "string",
              "enum": [
                ""
              ]
            }
          ]
        },
        "voice": {
          "type": "string",
          "description": "Default TTS voice (OpenAI / Gemini audio)"
        },
        "responseFormat": {
          "type": "string",
          "description": "TTS audio format (e.g. mp3, wav)"
        },
        "device": {
          "type": "string",
          "description": "Whisper runtime device (auto, cpu, cuda)"
        },
        "computeType": {
          "type": "string",
          "description": "Whisper numeric precision (e.g. int8, float16)"
        },
        "modelDir": {
          "type": "string",
          "description": "Whisper model weights cache directory"
        },
        "language": {
          "type": "string",
          "description": "Wispr Flow default language (ISO 639-1) or empty for auto-detect"
        },
        "appType": {
          "type": "string",
          "description": "Wispr Flow output formatting (e.g. ai, email)"
        },
        "model_kwargs": {
          "type": "object",
          "description": "Optional keyword arguments forwarded to LangChain embedding/LLM clients\n(mirrors Zod `z.record(z.any())`). Used by HuggingFace (`device`, `api_key`)\nand Bedrock (`max_tokens`) paths in Python; values are typically string,\nnumber, or boolean. Omitted when not configured.\n",
          "additionalProperties": {}
        },
        "encode_kwargs": {
          "type": "object",
          "description": "Optional encoding kwargs for embedding models (mirrors Zod\n`z.record(z.any())`). Commonly `normalize_embeddings` (boolean) for\nHuggingFace and SentenceTransformer providers. Omitted when not configured.\n",
          "additionalProperties": {}
        },
        "cache_folder": {
          "type": "string",
          "description": "Cache folder for models"
        }
      }
    }
  }
}