{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/WorkflowCustomModel",
  "title": "WorkflowCustomModel",
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "This is the provider of the model (`custom-llm`).",
      "enum": [
        "custom-llm"
      ]
    },
    "metadataSendMode": {
      "type": "string",
      "description": "This determines whether metadata is sent in requests to the custom provider.\n\n- `off` will not send any metadata. payload will look like `{ messages }`\n- `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }`\n- `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }`\n\nFurther, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload.\n\nDefault is `variable`.",
      "enum": [
        "off",
        "variable",
        "destructured"
      ]
    },
    "url": {
      "type": "string",
      "description": "These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1"
    },
    "headers": {
      "type": "object",
      "description": "These are the headers we'll use for the OpenAI client's `headers`."
    },
    "timeoutSeconds": {
      "type": "number",
      "description": "This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.",
      "minimum": 20,
      "maximum": 600
    },
    "model": {
      "type": "string",
      "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b",
      "maxLength": 100
    },
    "temperature": {
      "type": "number",
      "description": "This is the temperature of the model.",
      "minimum": 0,
      "maximum": 2
    },
    "maxTokens": {
      "type": "number",
      "description": "This is the max tokens of the model.",
      "minimum": 50,
      "maximum": 10000
    }
  },
  "required": [
    "provider",
    "url",
    "model"
  ]
}