{
  "$defs": {
    "agent": {
      "additionalProperties": false,
      "properties": {
        "calibration": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Calibration"
        },
        "endpoint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Endpoint"
        },
        "instructions": {
          "anyOf": [
            {
              "maxLength": 16000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Instructions"
        },
        "mock_file": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Mock File"
        },
        "repeat": {
          "anyOf": [
            {
              "maximum": 5,
              "minimum": 2,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Repeat"
        },
        "service_id": {
          "anyOf": [
            {
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._@:/-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Service Id"
        },
        "state_fields": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "State Fields"
        },
        "system_prompt": {
          "anyOf": [
            {
              "maxLength": 16000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "System Prompt"
        },
        "timeout_seconds": {
          "default": 15.0,
          "exclusiveMinimum": 0.0,
          "maximum": 120.0,
          "title": "Timeout Seconds",
          "type": "number"
        },
        "type": {
          "const": "agent"
        }
      },
      "required": [
        "type"
      ],
      "title": "agent provider config",
      "type": "object"
    },
    "check": {
      "additionalProperties": false,
      "properties": {
        "members": {
          "additionalProperties": {
            "$ref": "#/$defs/member"
          },
          "maxProperties": 2,
          "minProperties": 2,
          "title": "Members",
          "type": "object"
        },
        "type": {
          "const": "check"
        }
      },
      "required": [
        "members",
        "type"
      ],
      "title": "check provider config",
      "type": "object"
    },
    "llm": {
      "additionalProperties": false,
      "properties": {
        "batch": {
          "default": true,
          "title": "Batch",
          "type": "boolean"
        },
        "calibration": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Calibration"
        },
        "max_tokens": {
          "default": 4096,
          "maximum": 32000,
          "minimum": 64,
          "title": "Max Tokens",
          "type": "integer"
        },
        "model": {
          "anyOf": [
            {
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Model"
        },
        "reasoning_effort": {
          "anyOf": [
            {
              "enum": [
                "none",
                "low",
                "medium",
                "high"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Reasoning Effort"
        },
        "repeat": {
          "anyOf": [
            {
              "maximum": 5,
              "minimum": 2,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Repeat"
        },
        "state_fields": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "State Fields"
        },
        "temperature": {
          "anyOf": [
            {
              "maximum": 2.0,
              "minimum": 0.0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Temperature"
        },
        "timeout_ms": {
          "default": 30000,
          "maximum": 120000,
          "minimum": 1000,
          "title": "Timeout Ms",
          "type": "integer"
        },
        "type": {
          "const": "llm"
        }
      },
      "required": [
        "type"
      ],
      "title": "llm provider config",
      "type": "object"
    },
    "member": {
      "description": "A composite's member: a provider config of a type that is not a composite.",
      "oneOf": [
        {
          "$ref": "#/$defs/agent"
        },
        {
          "$ref": "#/$defs/llm"
        },
        {
          "$ref": "#/$defs/rules"
        }
      ]
    },
    "rules": {
      "additionalProperties": false,
      "description": "A `rules` variant: its type and the file of the agent its config is in, and nothing else\n(`Provider.config_problems`).",
      "properties": {
        "config": {
          "title": "Config",
          "type": "string"
        },
        "type": {
          "const": "rules"
        }
      },
      "required": [
        "config",
        "type"
      ],
      "title": "rules provider config",
      "type": "object"
    }
  },
  "$id": "https://mendari.co/spec/provider-configs.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "A provider variant's config in an agent's manifest (`providers.<slot>.variants.<name>`), one per provider type, each closed: a key it does not name is refused for an agent the deployment does not own and a warning for an owned one. Generated from the provider config models by scripts/provider_config_schema.py; do not edit.",
  "oneOf": [
    {
      "$ref": "#/$defs/agent"
    },
    {
      "$ref": "#/$defs/check"
    },
    {
      "$ref": "#/$defs/llm"
    },
    {
      "$ref": "#/$defs/rules"
    }
  ],
  "title": "Mendari provider configs"
}
