{
"event": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/ModelConfig.php",
"old_string": "\/**\n * @deprecated Use ModelRegistry via DI instead. This class will be removed in a future version.\n * Views still use this temporarily until they are refactored.\n *\/\nfinal class ModelConfig",
"new_string": "\/**\n * @deprecated Use ModelRegistry via DI instead. This class will be removed in a future version.\n * Views still use this temporarily until they are refactored.\n * @see ModelRegistry\n *\/\nfinal class ModelConfig"
}
}
{
"tool_response": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/ModelConfig.php",
"oldString": "\/**\n * @deprecated Use ModelRegistry via DI instead. This class will be removed in a future version.\n * Views still use this temporarily until they are refactored.\n *\/\nfinal class ModelConfig",
"newString": "\/**\n * @deprecated Use ModelRegistry via DI instead. This class will be removed in a future version.\n * Views still use this temporarily until they are refactored.\n * @see ModelRegistry\n *\/\nfinal class ModelConfig",
"originalFile": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\AI;\n\n\/\/ @responsibility: Legacy-Interface für Modell-Konfiguration (delegiert an ModelRegistry)\n\n\/**\n * @deprecated Use ModelRegistry via DI instead. This class will be removed in a future version.\n * Views still use this temporarily until they are refactored.\n *\/\nfinal class ModelConfig\n{\n \/**\n * Get all available chat models.\n *\n * @return array<string, string> [model_key => display_name]\n *\/\n public static function getAll(): array\n {\n return ModelRegistry::getInstance()->getChatModels();\n }\n\n \/**\n * Get vision-capable models.\n *\n * @return array<string, string> [model_key => display_name]\n *\/\n public static function getVisionModels(): array\n {\n return ModelRegistry::getInstance()->getVisionModels();\n }\n\n \/**\n * Get display label for a model ID.\n *\/\n public static function getLabel(string $modelId): string\n {\n return ModelRegistry::getInstance()->getLabel($modelId);\n }\n\n \/**\n * Check if a model ID is valid.\n *\/\n public static function isValid(string $modelId): bool\n {\n $registry = ModelRegistry::getInstance();\n\n \/\/ Check in registry first\n if ($registry->isValid($modelId)) {\n return true;\n }\n\n \/\/ Fallback: accept any claude- or ollama: prefixed model\n return 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::getDefaultModel();\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 \/**\n * Get default chat model.\n *\/\n public static function getDefaultModel(): string\n {\n return ModelRegistry::getInstance()->getDefaultChatModel();\n }\n\n \/**\n * Get default vision model.\n *\/\n public static function getDefaultVisionModel(): string\n {\n return ModelRegistry::getInstance()->getDefaultVisionModel();\n }\n\n \/**\n * Force refresh of model cache (e.g., after Ollama sync).\n *\/\n public static function clearCache(): void\n {\n ModelRegistry::clearCache();\n }\n\n \/**\n * Sync models from Ollama.\n *\n * @return array Sync results\n *\/\n public static function syncFromOllama(): array\n {\n return ModelRegistry::getInstance()->syncFromOllama();\n }\n}\n",
"structuredPatch": [
{
"oldStart": 9,
"oldLines": 6,
"newStart": 9,
"newLines": 7,
"lines": [
" \/**",
" * @deprecated Use ModelRegistry via DI instead. This class will be removed in a future version.",
" * Views still use this temporarily until they are refactored.",
"+ * @see ModelRegistry",
" *\/",
" final class ModelConfig",
" {"
]
}
],
"userModified": false,
"replaceAll": false
}
}