Protokoll #4551

ID4551
Zeitstempel2025-12-22 10:14:58.242261
Clientroot
IP145.224.96.190
Modellclaude-sonnet-4-20250514
Statuscompleted
Tokens1,068 (Input: 156, Output: 912)
Dauer102 ms
Request-Zeit2025-12-22 10:14:58.242261
Response-Zeit2025-12-22 10:14:58.344520

Request

{
    "event": "PreToolUse",
    "tool_name": "Edit",
    "tool_input": {
        "file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/ModelConfig.php",
        "old_string": "    \/**\n     * Get all models as array.\n     *\/\n    public static function getAll(): array\n    {\n        return self::MODELS;\n    }",
        "new_string": "    \/**\n     * Get all models as array.\n     *\/\n    public static function getAll(): array\n    {\n        return self::MODELS;\n    }\n\n    \/**\n     * Get vision-capable models.\n     *\/\n    public static function getVisionModels(): array\n    {\n        return self::VISION_MODELS;\n    }"
    }
}

Response

{
    "tool_response": {
        "filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/AI\/ModelConfig.php",
        "oldString": "    \/**\n     * Get all models as array.\n     *\/\n    public static function getAll(): array\n    {\n        return self::MODELS;\n    }",
        "newString": "    \/**\n     * Get all models as array.\n     *\/\n    public static function getAll(): array\n    {\n        return self::MODELS;\n    }\n\n    \/**\n     * Get vision-capable models.\n     *\/\n    public static function getVisionModels(): array\n    {\n        return self::VISION_MODELS;\n    }",
        "originalFile": "<?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 (Text)\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        \/\/ Local Ollama models (Vision)\n        'ollama:minicpm-v:latest' => 'MiniCPM-V (Vision)',\n    ];\n\n    \/**\n     * Vision-capable models for image\/document analysis.\n     *\/\n    public const VISION_MODELS = [\n        'ollama:minicpm-v:latest' => 'MiniCPM-V (Vision, lokal)',\n        'claude-opus-4-5-20251101' => 'Claude Opus 4.5 (Vision)',\n        'claude-sonnet-4-20250514' => 'Claude Sonnet 4 (Vision)',\n    ];\n\n    \/**\n     * Default vision model for document analysis.\n     *\/\n    public const DEFAULT_VISION_MODEL = 'ollama:minicpm-v:latest';\n\n    \/**\n     * Default model for new sessions\/orders.\n     * Local Ollama model for cost-efficiency.\n     *\/\n    public const DEFAULT_MODEL = 'ollama:gemma3:4b-it-qat';\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": [
            {
                "oldStart": 56,
                "oldLines": 6,
                "newStart": 56,
                "newLines": 14,
                "lines": [
                    "     }",
                    " ",
                    "     \/**",
                    "+     * Get vision-capable models.",
                    "+     *\/",
                    "+    public static function getVisionModels(): array",
                    "+    {",
                    "+        return self::VISION_MODELS;",
                    "+    }",
                    "+",
                    "+    \/**",
                    "      * Get display label for a model ID.",
                    "      *\/",
                    "     public static function getLabel(string $modelId): string"
                ]
            }
        ],
        "userModified": false,
        "replaceAll": false
    }
}
← Vorheriger Zur Liste Nächster →