Enable Discovery debug logging for production troubleshooting

- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Domain\AI;
@@ -45,7 +46,6 @@ enum AiModel: string
case OLLAMA_LLAMA3_2_3B = 'llama3.2:3b';
case OLLAMA_DEEPSEEK_CODER = 'deepseek-coder:6.7b';
public function getProvider(): AiProvider
{
return match($this) {

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Domain\AI;

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Domain\AI;
@@ -11,5 +12,6 @@ final class AiQuery
public array $messages = [],
public float $temperature = 0.7,
public ?int $maxTokens = null
) {}
) {
}
}

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Domain\AI;

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace App\Domain\AI;
@@ -10,5 +11,6 @@ final class AiResponse
public string $provider,
public string $model,
public ?int $tokensUsed = null
) {}
) {
}
}

View File

@@ -1,10 +1,12 @@
<?php
declare(strict_types=1);
namespace App\Domain\AI\Exception;
use App\Framework\Exception\FrameworkException;
use App\Domain\AI\AiProvider;
use App\Framework\Exception\ExceptionContext;
use App\Framework\Exception\FrameworkException;
class AiProviderUnavailableException extends FrameworkException
{
@@ -14,6 +16,15 @@ class AiProviderUnavailableException extends FrameworkException
if ($reason) {
$message .= ": $reason";
}
parent::__construct($message);
parent::__construct(
message: $message,
context: ExceptionContext::forOperation('ai_provider_connection', 'AI')
->withData([
'provider' => $provider->value,
'reason' => $reason,
'unavailable' => true,
])
);
}
}

View File

@@ -1,9 +1,10 @@
<?php
declare(strict_types=1);
namespace App\Domain\AI;
enum Role:string
enum Role: string
{
case SYSTEM = 'system';
case USER = 'user';