Protokoll #15051

ID15051
Zeitstempel2025-12-25 13:29:09.958096
Clientroot
IP145.224.72.140
Modellclaude-sonnet-4-20250514
Statuscompleted
Tokens743 (Input: 38, Output: 705)
Dauer101 ms
Request-Zeit2025-12-25 13:29:09.958096
Response-Zeit2025-12-25 13:29:10.059299

Request

{
    "event": "PreToolUse",
    "tool_name": "Read",
    "tool_input": {
        "file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/ModelConfig.php"
    }
}

Response

{
    "tool_response": {
        "type": "text",
        "file": {
            "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\/\/ @responsibility: Legacy-Interface für Modell-Konfiguration (delegiert an ModelRegistry)\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",
            "numLines": 106,
            "startLine": 1,
            "totalLines": 106
        }
    }
}
← Vorheriger Zur Liste Nächster →