{
"event": "PreToolUse",
"tool_name": "Write",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/ModelConfig.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\AI;\n\n\/**\n * Central configuration for available AI models.\n * Used by Chat, Content Studio, and other AI-powered features.\n *\/\nfinal class ModelConfig\n{\n \/**\n * All available models with their display labels.\n * Format: 'model-id' => 'Display Label'\n *\/\n public const MODELS = [\n \/\/ Anthropic Claude\n 'claude-opus-4-5-20251101' => 'Claude Opus 4.5',\n 'claude-sonnet-4-20250514' => 'Claude Sonnet 4',\n \/\/ Local Ollama models\n 'ollama:gemma3:4b-it-qat' => 'Gemma 3 (lokal)',\n 'ollama:mistral:latest' => 'Mistral (lokal)',\n 'ollama:llama3.2:latest' => 'Llama 3.2 (lokal)',\n 'ollama:gpt-oss:20b' => 'GPT-OSS 20B (lokal)',\n ];\n\n \/**\n * Default model for new sessions\/orders.\n *\/\n public const DEFAULT_MODEL = 'claude-opus-4-5-20251101';\n\n \/**\n * Get all models as array.\n *\/\n public static function getAll(): array\n {\n return self::MODELS;\n }\n\n \/**\n * Get display label for a model ID.\n *\/\n public static function getLabel(string $modelId): string\n {\n return self::MODELS[$modelId] ?? $modelId;\n }\n\n \/**\n * Check if a model ID is valid.\n *\/\n public static function isValid(string $modelId): bool\n {\n return isset(self::MODELS[$modelId])\n || str_starts_with($modelId, 'claude-')\n || str_starts_with($modelId, 'ollama:');\n }\n\n \/**\n * Validate and return model, or default if invalid.\n *\/\n public static function validate(string $modelId): string\n {\n return self::isValid($modelId) ? $modelId : self::DEFAULT_MODEL;\n }\n\n \/**\n * Check if model is a local (Ollama) model.\n *\/\n public static function isLocal(string $modelId): bool\n {\n return str_starts_with($modelId, 'ollama:');\n }\n}\n"
}
}
{
"tool_response": {
"type": "create",
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/ModelConfig.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\AI;\n\n\/**\n * Central configuration for available AI models.\n * Used by Chat, Content Studio, and other AI-powered features.\n *\/\nfinal class ModelConfig\n{\n \/**\n * All available models with their display labels.\n * Format: 'model-id' => 'Display Label'\n *\/\n public const MODELS = [\n \/\/ Anthropic Claude\n 'claude-opus-4-5-20251101' => 'Claude Opus 4.5',\n 'claude-sonnet-4-20250514' => 'Claude Sonnet 4',\n \/\/ Local Ollama models\n 'ollama:gemma3:4b-it-qat' => 'Gemma 3 (lokal)',\n 'ollama:mistral:latest' => 'Mistral (lokal)',\n 'ollama:llama3.2:latest' => 'Llama 3.2 (lokal)',\n 'ollama:gpt-oss:20b' => 'GPT-OSS 20B (lokal)',\n ];\n\n \/**\n * Default model for new sessions\/orders.\n *\/\n public const DEFAULT_MODEL = 'claude-opus-4-5-20251101';\n\n \/**\n * Get all models as array.\n *\/\n public static function getAll(): array\n {\n return self::MODELS;\n }\n\n \/**\n * Get display label for a model ID.\n *\/\n public static function getLabel(string $modelId): string\n {\n return self::MODELS[$modelId] ?? $modelId;\n }\n\n \/**\n * Check if a model ID is valid.\n *\/\n public static function isValid(string $modelId): bool\n {\n return isset(self::MODELS[$modelId])\n || str_starts_with($modelId, 'claude-')\n || str_starts_with($modelId, 'ollama:');\n }\n\n \/**\n * Validate and return model, or default if invalid.\n *\/\n public static function validate(string $modelId): string\n {\n return self::isValid($modelId) ? $modelId : self::DEFAULT_MODEL;\n }\n\n \/**\n * Check if model is a local (Ollama) model.\n *\/\n public static function isLocal(string $modelId): bool\n {\n return str_starts_with($modelId, 'ollama:');\n }\n}\n",
"structuredPatch": [],
"originalFile": null
}
}