{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vertesiahq/json-schema/vertesiahq-execution-environment-schema.json",
  "title": "ExecutionEnvironment",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vertesiahq-environments-api-openapi.yml#/components/schemas/ExecutionEnvironment",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "provider": {
      "$ref": "#/$defs/SupportedProviders"
    },
    "description": {
      "type": "string"
    },
    "endpoint_url": {
      "type": "string"
    },
    "default_model": {
      "type": "string"
    },
    "enabled_models": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AIModel"
      }
    },
    "apiKey": {
      "type": "string"
    },
    "apikey_hint": {
      "type": "string",
      "description": "Hint showing first and last characters of the API key (e.g. \"AKIA...3xQf\"). Stored alongside the encrypted key so the UI can display which key is configured."
    },
    "config": {},
    "settings": {
      "$ref": "#/$defs/ExecutionEnvironmentSettings",
      "description": "Additional provider-specific settings passed through to the driver. For example, custom headers for Apigee-proxied endpoints."
    },
    "account": {
      "type": "string"
    },
    "allowed_projects": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "created_by": {
      "type": "string"
    },
    "updated_by": {
      "type": "string"
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "name",
    "provider",
    "account",
    "created_by",
    "updated_by",
    "created_at",
    "updated_at"
  ],
  "additionalProperties": false,
  "$defs": {
    "AIModel": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/ModelType"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "owner": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/AIModelStatus"
        },
        "can_stream": {
          "type": "boolean"
        },
        "is_custom": {
          "type": "boolean"
        },
        "is_multimodal": {
          "type": "boolean"
        },
        "input_modalities": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "output_modalities": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tool_support": {
          "type": "boolean"
        },
        "environment": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "provider"
      ],
      "additionalProperties": false
    },
    "AIModelStatus": {
      "type": "string",
      "enum": [
        "available",
        "pending",
        "stopped",
        "unavailable",
        "unknown",
        "legacy"
      ]
    },
    "ExecutionEnvironmentSettings": {
      "type": "object",
      "properties": {
        "default_headers": {
          "$ref": "#/$defs/StringValueMap",
          "description": "Custom HTTP headers sent by OpenAI-compatible environments."
        }
      }
    },
    "ModelType": {
      "type": "string",
      "enum": [
        "classifier",
        "regressor",
        "clustering",
        "anomaly-detection",
        "time-series",
        "text",
        "image",
        "audio",
        "video",
        "embedding",
        "chat",
        "code",
        "nlp",
        "multi-modal",
        "test",
        "other",
        "unknown"
      ]
    },
    "StringValueMap": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "SupportedProviders": {
      "type": "string",
      "enum": [
        "openai",
        "openai_compatible",
        "azure_openai",
        "azure_foundry",
        "huggingface_ie",
        "replicate",
        "bedrock",
        "bedrock_mantle",
        "vertexai",
        "togetherai",
        "mistralai",
        "groq",
        "watsonx",
        "xai",
        "anthropic",
        "openrouter",
        "virtual_lb",
        "virtual_mediator",
        "test"
      ]
    }
  }
}