diff --git a/api/agents-census.php b/api/agents-census.php index fa4f11271..8c9105016 100644 --- a/api/agents-census.php +++ b/api/agents-census.php @@ -45,7 +45,7 @@ $pc_roles=(int)trim(shell_exec("grep -r 'role' /opt/paperclip-weval/server/src/ $crew=(int)trim(shell_exec("grep -c 'Agent' /opt/weval-crewai/wevia-crew.py 2>/dev/null")); // Ollama models -$ollama=@json_decode(@file_get_contents('http://127.0.0.1:11435/api/tags'),true); +$ollama=@json_decode(@file_get_contents('http://127.0.0.1:11434/api/tags'),true); $ollama_count=count($ollama['models']??[]); // Live agents from status diff --git a/api/ai-benchmark-live.php b/api/ai-benchmark-live.php index 1b5616a9c..f1fa292ad 100644 --- a/api/ai-benchmark-live.php +++ b/api/ai-benchmark-live.php @@ -61,7 +61,7 @@ foreach($test_providers as $prov) { } // 8. Ollama models -exec('curl -s --max-time 3 http://localhost:11435/api/tags 2>/dev/null | python3 -c "import sys,json;print(len(json.load(sys.stdin).get(\"models\",[])))" 2>/dev/null', $ollama_out); +exec('curl -s --max-time 3 http://localhost:11434/api/tags 2>/dev/null | python3 -c "import sys,json;print(len(json.load(sys.stdin).get(\"models\",[])))" 2>/dev/null', $ollama_out); $ollama_models = (int)($ollama_out[0] ?? 0); // 9. Git repos diff --git a/api/ai-benchmark.php b/api/ai-benchmark.php index 95eb1c543..f40e273d5 100644 --- a/api/ai-benchmark.php +++ b/api/ai-benchmark.php @@ -128,7 +128,7 @@ function call_ollama($prompt, $model) { 'content' => json_encode(['model' => $model, 'prompt' => $prompt, 'stream' => false, 'options' => ['num_predict' => 200, 'num_ctx' => 512]]), 'timeout' => 30 ]]); - $r = @file_get_contents('http://127.0.0.1:11435/api/generate', false, $ctx); + $r = @file_get_contents('http://127.0.0.1:11434/api/generate', false, $ctx); $lat = intval((microtime(true) - $t0) * 1000); if (!$r) return ['response' => '', 'provider' => $model, 'latency' => $lat, 'tps' => 0]; $d = json_decode($r, true); diff --git a/api/api-key-hub.php b/api/api-key-hub.php index 0dfe7c142..6e5525c97 100644 --- a/api/api-key-hub.php +++ b/api/api-key-hub.php @@ -47,7 +47,7 @@ $ds_d = @json_decode($ds_web, true); $results[] = ["name" => "DeepSeek Web", "status" => $ds_d ? "ACTIVE" : "DOWN", "code" => $ds_d ? 200 : 0, "renew" => "chat.deepseek.com → F12 → cookie", "unlimited" => true]; // Ollama -$ollama = @file_get_contents("http://localhost:11435/api/tags"); +$ollama = @file_get_contents("http://localhost:11434/api/tags"); $ol_d = @json_decode($ollama, true); $ol_cnt = count($ol_d["models"] ?? []); $results[] = ["name" => "Ollama Local", "status" => $ol_cnt > 0 ? "OK" : "DOWN", "code" => 200, "models" => $ol_cnt, "unlimited" => true]; diff --git a/api/architecture-autonomous.php b/api/architecture-autonomous.php index d7bf2de70..177845e7b 100644 --- a/api/architecture-autonomous.php +++ b/api/architecture-autonomous.php @@ -104,7 +104,7 @@ foreach ($dbs as $db) { } // 6. AI stack → nodes -$ollama_models = @json_decode(@file_get_contents('http://127.0.0.1:11435/api/tags'), true); +$ollama_models = @json_decode(@file_get_contents('http://127.0.0.1:11434/api/tags'), true); $model_count = count($ollama_models['models'] ?? []); $T['nodes'][] = ['id'=>'ollama','label'=>"Ollama ({$model_count} models)",'type'=>'ai','server'=>'S204','status'=>'active','group'=>'ai']; @@ -131,7 +131,7 @@ $T['nodes'][] = ['id'=>'authentik','label'=>'Authentik SSO','type'=>'auth','serv $T['edges'][] = ['from'=>'cloudflare','to'=>'s204','label'=>'HTTPS','type'=>'network']; $T['edges'][] = ['from'=>'s204','to'=>'s95','label'=>'10.1.0.x','type'=>'private']; $T['edges'][] = ['from'=>'s204','to'=>'authentik','label'=>':9090','type'=>'auth']; -$T['edges'][] = ['from'=>'s204','to'=>'ollama','label'=>':11435','type'=>'ai']; +$T['edges'][] = ['from'=>'s204','to'=>'ollama','label'=>':11434','type'=>'ai']; $T['edges'][] = ['from'=>'s204','to'=>'qdrant','label'=>':6333','type'=>'ai']; // ═══ AUTONOMOUS ACTIONS ═══ diff --git a/api/architecture-bpmn.php b/api/architecture-bpmn.php index 3cfd57bf0..f888c488e 100644 --- a/api/architecture-bpmn.php +++ b/api/architecture-bpmn.php @@ -16,7 +16,7 @@ function discover_bpmn_soa(&$T) { 'steps'=>[ ['task'=>'User Message','type'=>'start','actor'=>'Browser','status'=>'trigger'], ['task'=>'CORTEX Router','type'=>'gateway','actor'=>'weval-ia-fast.php','status'=>'automated'], - ['task'=>'T0 Ollama','type'=>'service','actor'=>'Ollama :11435','status'=>'automated'], + ['task'=>'T0 Ollama','type'=>'service','actor'=>'Ollama :11434','status'=>'automated'], ['task'=>'T1 Free APIs','type'=>'service','actor'=>'Cerebras/Groq','status'=>'automated'], ['task'=>'RAG Enrichment','type'=>'service','actor'=>'Qdrant','status'=>'automated'], ['task'=>'Response Stream','type'=>'end','actor'=>'SSE','status'=>'automated'], diff --git a/api/architecture-recommendations.php b/api/architecture-recommendations.php index e9dbf78a1..a6a5d86be 100644 --- a/api/architecture-recommendations.php +++ b/api/architecture-recommendations.php @@ -79,12 +79,12 @@ function generate_recommendations($A) { if ($total_size_gb > 50) { $recs[] = ['severity'=>'info','category'=>'SCALABILITY','title'=>"Ollama: {$total_size_gb}GB de modèles", 'detail'=>"Espace modèles important. Considérer supprimer modèles non utilisés.", - 'action'=>'auto','fix_cmd'=>'curl -s -X DELETE http://127.0.0.1:11435/api/delete -d {"name":"weval-brain-v2:latest"} 2>/dev/null; curl -s -X DELETE http://127.0.0.1:11435/api/delete -d {"name":"qwen2.5:7b"} 2>/dev/null; curl -s -X DELETE http://127.0.0.1:11435/api/delete -d {"name":"mistral:latest"} 2>/dev/null']; + 'action'=>'auto','fix_cmd'=>'curl -s -X DELETE http://127.0.0.1:11434/api/delete -d {"name":"weval-brain-v2:latest"} 2>/dev/null; curl -s -X DELETE http://127.0.0.1:11434/api/delete -d {"name":"qwen2.5:7b"} 2>/dev/null; curl -s -X DELETE http://127.0.0.1:11434/api/delete -d {"name":"mistral:latest"} 2>/dev/null']; } if ($ollama_count >= 20) { $recs[] = ['severity'=>'opportunity','category'=>'OPTIMIZATION','title'=>"Ollama: {$ollama_count} modèles chargés", 'detail'=>"Beaucoup de modèles. Fine-tuner weval-brain-v3 comme modèle unique remplaçant les autres.", - 'action'=>'auto','fix_cmd'=>'curl -s -X DELETE http://127.0.0.1:11435/api/delete -d {"name":"weval-brain-v2:latest"} 2>/dev/null']; + 'action'=>'auto','fix_cmd'=>'curl -s -X DELETE http://127.0.0.1:11434/api/delete -d {"name":"weval-brain-v2:latest"} 2>/dev/null']; } // Qdrant health diff --git a/api/architecture-scanner.php b/api/architecture-scanner.php index 2779bba24..9ea020e1e 100644 --- a/api/architecture-scanner.php +++ b/api/architecture-scanner.php @@ -106,7 +106,7 @@ $A['databases']['key_tables'] = [ // ═══════════════════════════════════════════ // OLLAMA MODELS // ═══════════════════════════════════════════ -$ollama = @json_decode(@file_get_contents('http://127.0.0.1:11435/api/tags'), true); +$ollama = @json_decode(@file_get_contents('http://127.0.0.1:11434/api/tags'), true); $A['ollama'] = []; if(!empty($ollama['models'])) { foreach($ollama['models'] as $m) { @@ -215,7 +215,7 @@ $A['applications'] = [ // Authentik REMOVED 8avr ['name'=>'SearXNG','type'=>'Search','url'=>null,'port'=>8888,'server'=>'S204','auth'=>'internal'], ['name'=>'Qdrant','type'=>'Vector DB','url'=>null,'port'=>6333,'server'=>'S204','auth'=>'internal'], - ['name'=>'Ollama','type'=>'LLM Runtime','url'=>null,'port'=>11435,'server'=>'S204','auth'=>'internal'], + ['name'=>'Ollama','type'=>'LLM Runtime','url'=>null,'port'=>11434,'server'=>'S204','auth'=>'internal'], ['name'=>'Flowise','type'=>'AI Flow','url'=>null,'port'=>3088,'server'=>'S204','auth'=>'internal'], ['name'=>'MiroFish','type'=>'AI Agent','url'=>'mirofish.weval-consulting.com','port'=>3050,'server'=>'S204','auth'=>'php-session'], ['name'=>'Open WebUI','type'=>'LLM UI','url'=>null,'port'=>3002,'server'=>'S204','auth'=>'internal'], diff --git a/api/blade-ops-api.php b/api/blade-ops-api.php index 22413b192..209ef680c 100644 --- a/api/blade-ops-api.php +++ b/api/blade-ops-api.php @@ -101,10 +101,10 @@ switch ($action) { // ═══════════════════════════════════════ case 'ai': $p=$_REQUEST['prompt']??'';$m=$_REQUEST['model']??'qwen3:8b';if(!$p){echo json_encode(['error'=>'no prompt']);break;} - $c=curl_init('http://127.0.0.1:11435/api/generate');curl_setopt_array($c,[CURLOPT_POST=>1,CURLOPT_POSTFIELDS=>json_encode(['model'=>$m,'prompt'=>$p,'stream'=>false]),CURLOPT_HTTPHEADER=>['Content-Type: application/json'],CURLOPT_RETURNTRANSFER=>1,CURLOPT_TIMEOUT=>60]);$r=curl_exec($c);curl_close($c);$d=json_decode($r,1); + $c=curl_init('http://127.0.0.1:11434/api/generate');curl_setopt_array($c,[CURLOPT_POST=>1,CURLOPT_POSTFIELDS=>json_encode(['model'=>$m,'prompt'=>$p,'stream'=>false]),CURLOPT_HTTPHEADER=>['Content-Type: application/json'],CURLOPT_RETURNTRANSFER=>1,CURLOPT_TIMEOUT=>60]);$r=curl_exec($c);curl_close($c);$d=json_decode($r,1); echo json_encode(['ok'=>1,'model'=>$m,'response'=>$d['response']??'']);break; case 'ai_models': - $r=fetch_url('http://127.0.0.1:11435/api/tags');$d=json_decode($r,1); + $r=fetch_url('http://127.0.0.1:11434/api/tags');$d=json_decode($r,1); echo json_encode(['ok'=>1,'models'=>array_map(fn($m)=>['name'=>$m['name'],'size'=>round(($m['size']??0)/1e9,1).'GB'],$d['models']??[])]);break; // ═══════════════════════════════════════ @@ -174,7 +174,7 @@ switch ($action) { $host=$_REQUEST['host']??'';if(!$host){echo json_encode(['error'=>'no host']);break;} echo json_encode(['ok'=>1,'output'=>cx("ping -c 3 ".escapeshellarg($host)." 2>&1")]);break; case 'ports': - $host=$_REQUEST['host']??'127.0.0.1';$ports=$_REQUEST['ports']??'22,25,80,443,5432,5678,8065,9090,9443,11435'; + $host=$_REQUEST['host']??'127.0.0.1';$ports=$_REQUEST['ports']??'22,25,80,443,5432,5678,8065,9090,9443,11434'; $cmd="for p in ".str_replace(',',' ',$ports)."; do (echo >/dev/tcp/$host/\$p) 2>/dev/null && echo \"\$p OPEN\" || echo \"\$p CLOSED\"; done"; echo json_encode(['ok'=>1,'output'=>cx("bash -c ".escapeshellarg($cmd))]);break; case 'ssl_check': diff --git a/api/blade-power.php b/api/blade-power.php index b75d09f39..079109229 100644 --- a/api/blade-power.php +++ b/api/blade-power.php @@ -7,7 +7,7 @@ switch($a){ case "providers": $provs=["Groq"=>["https://api.groq.com/openai/v1/models","GROQ_KEY"],"Cerebras"=>["https://api.cerebras.ai/v1/models","CEREBRAS_API_KEY"],"Gemini"=>["https://generativelanguage.googleapis.com/v1beta/models?key=".($ws["GEMINI_KEY"]??""),""],"OpenRouter"=>["https://openrouter.ai/api/v1/models","OPENROUTER_KEY"],"Mistral"=>["https://api.mistral.ai/v1/models","MISTRAL_KEY"],"Together"=>["https://api.together.xyz/v1/models","TOGETHER_KEY"],"HuggingFace"=>["https://router.huggingface.co/v1/models","HF_TOKEN"],"NVIDIA"=>["https://integrate.api.nvidia.com/v1/models","NVIDIA_NIM_KEY"]]; $r=[];foreach($provs as $n=>[$url,$kn]){$key=$kn?($ws[$kn]??""):"";if(!$key&&$kn){$r[$n]=["status"=>"no_key"];continue;}$ch=curl_init($url);curl_setopt_array($ch,[CURLOPT_RETURNTRANSFER=>1,CURLOPT_TIMEOUT=>8,CURLOPT_CONNECTTIMEOUT=>3]);if($key)curl_setopt($ch,CURLOPT_HTTPHEADER,["Authorization: Bearer $key"]);$resp=curl_exec($ch);$code=curl_getinfo($ch,CURLINFO_HTTP_CODE);$time=round(curl_getinfo($ch,CURLINFO_TOTAL_TIME),2);curl_close($ch);$r[$n]=["status"=>$code==200?"up":"down","code"=>$code,"time"=>$time."s"];} - $ch=curl_init("http://127.0.0.1:11435/api/tags");curl_setopt_array($ch,[CURLOPT_RETURNTRANSFER=>1,CURLOPT_TIMEOUT=>3]);$resp=curl_exec($ch);$code=curl_getinfo($ch,CURLINFO_HTTP_CODE);curl_close($ch);$d=json_decode($resp,true);$r["Ollama_S204"]=["status"=>$code==200?"up":"down","models"=>count($d["models"]??[])]; + $ch=curl_init("http://127.0.0.1:11434/api/tags");curl_setopt_array($ch,[CURLOPT_RETURNTRANSFER=>1,CURLOPT_TIMEOUT=>3]);$resp=curl_exec($ch);$code=curl_getinfo($ch,CURLINFO_HTTP_CODE);curl_close($ch);$d=json_decode($resp,true);$r["Ollama_S204"]=["status"=>$code==200?"up":"down","models"=>count($d["models"]??[])]; echo json_encode(["providers"=>$r,"total"=>count($r),"up"=>count(array_filter($r,fn($x)=>($x["status"]??"")=="up"))]);break; case "metrics": diff --git a/api/blade-tasks/heartbeat.json b/api/blade-tasks/heartbeat.json index 3cf974808..c91981a1e 100644 --- a/api/blade-tasks/heartbeat.json +++ b/api/blade-tasks/heartbeat.json @@ -1,11 +1,11 @@ { - "ts": "2026-04-16T00:22:17+00:00", - "hostname": "LAPTOP-VE75QUHF", - "cpu": "41%", - "ram": "83% (16GB)", + "ts": "2026-04-16T00:28:20+00:00", + "hostname": "blade", + "cpu": "?", + "ram": "?", "disk": "?", - "uptime": "3d08h35m", - "user": "Yace", + "uptime": "?", + "user": "?", "ip": "196.217.166.63", "agent_version": "2.0" } \ No newline at end of file diff --git a/api/blade-tasks/pat-renew.json b/api/blade-tasks/pat-renew.json new file mode 100644 index 000000000..492878654 --- /dev/null +++ b/api/blade-tasks/pat-renew.json @@ -0,0 +1,9 @@ +{ + "id": "pat-renew-1776299189", + "type": "browser", + "goal": "Ouvrir Chrome sur https://github.com/settings/tokens/new pour creer un nouveau PAT", + "cmd": "Start-Process chrome.exe 'https://github.com/settings/tokens/new'", + "status": "pending", + "created": "2026-04-16T02:26:29", + "priority": "high" +} \ No newline at end of file diff --git a/api/blade-tasks/task_20260416_002439_ea975b.json b/api/blade-tasks/task_20260416_002439_ea975b.json new file mode 100644 index 000000000..8ae700825 --- /dev/null +++ b/api/blade-tasks/task_20260416_002439_ea975b.json @@ -0,0 +1,15 @@ +{ + "id": "task_20260416_002439_ea975b", + "type": "powershell", + "cmd": "if (Get-Command chrome -ErrorAction SilentlyContinue) { Start-Process chrome 'https:\/\/github.com\/settings\/tokens' } else { Write-Error 'Chrome not found' }", + "label": "Agent: if (Get-Command chrome -ErrorAction SilentlyContin", + "priority": 10, + "status": "dispatched", + "created": "2026-04-16T00:24:39+00:00", + "started": null, + "completed": null, + "result": null, + "error": null, + "source": "api", + "dispatched_at": "2026-04-16T00:24:39+00:00" +} \ No newline at end of file diff --git a/api/blade-tasks/task_20260416_002445_b632bc.json b/api/blade-tasks/task_20260416_002445_b632bc.json new file mode 100644 index 000000000..421ced708 --- /dev/null +++ b/api/blade-tasks/task_20260416_002445_b632bc.json @@ -0,0 +1,15 @@ +{ + "id": "task_20260416_002445_b632bc", + "type": "powershell", + "cmd": "Start-Process chrome.exe 'https:\/\/github.com\/settings\/tokens'", + "label": "Agent: Start-Process chrome.exe 'https:\/\/github.com\/setti", + "priority": 10, + "status": "dispatched", + "created": "2026-04-16T00:24:45+00:00", + "started": null, + "completed": null, + "result": null, + "error": null, + "source": "api", + "dispatched_at": "2026-04-16T00:24:49+00:00" +} \ No newline at end of file diff --git a/api/blade-tasks/task_20260416_002529_a157a4.json b/api/blade-tasks/task_20260416_002529_a157a4.json new file mode 100644 index 000000000..336ad1a7f --- /dev/null +++ b/api/blade-tasks/task_20260416_002529_a157a4.json @@ -0,0 +1,15 @@ +{ + "id": "task_20260416_002529_a157a4", + "type": "powershell", + "cmd": "Start-Process chrome.exe 'https:\/\/github.com\/settings\/tokens\/new'", + "label": "Agent: Start-Process chrome.exe 'https:\/\/github.com\/setti", + "priority": 10, + "status": "dispatched", + "created": "2026-04-16T00:25:29+00:00", + "started": null, + "completed": null, + "result": null, + "error": null, + "source": "api", + "dispatched_at": "2026-04-16T00:25:31+00:00" +} \ No newline at end of file diff --git a/api/blade-tasks/task_20260416_002540_4ba239.json b/api/blade-tasks/task_20260416_002540_4ba239.json new file mode 100644 index 000000000..ae4a68d7b --- /dev/null +++ b/api/blade-tasks/task_20260416_002540_4ba239.json @@ -0,0 +1,15 @@ +{ + "id": "task_20260416_002540_4ba239", + "type": "powershell", + "cmd": "Get-Content C:\\ProgramData\\WEVAL\\sentinel.log -Tail 30 -ErrorAction SilentlyContinue; Write-Output \"===PROCS===\"; Get-Process powershell | Select-Object Id,StartTime,CommandLine | Format-List", + "label": "DEBUG: Read sentinel log and kill old processes", + "priority": 99, + "status": "dispatched", + "created": "2026-04-16T00:25:40+00:00", + "started": null, + "completed": null, + "result": null, + "error": null, + "source": "api", + "dispatched_at": "2026-04-16T00:25:41+00:00" +} \ No newline at end of file diff --git a/api/blade-tasks/task_20260416_002540_c86338.json b/api/blade-tasks/task_20260416_002540_c86338.json new file mode 100644 index 000000000..c69e2b8c5 --- /dev/null +++ b/api/blade-tasks/task_20260416_002540_c86338.json @@ -0,0 +1,15 @@ +{ + "id": "task_20260416_002540_c86338", + "type": "powershell", + "cmd": "Start-Process chrome.exe 'https:\/\/github.com\/settings\/tokens\/new'", + "label": "Agent: Start-Process chrome.exe 'https:\/\/github.com\/setti", + "priority": 10, + "status": "dispatched", + "created": "2026-04-16T00:25:40+00:00", + "started": null, + "completed": null, + "result": null, + "error": null, + "source": "api", + "dispatched_at": "2026-04-16T00:25:50+00:00" +} \ No newline at end of file diff --git a/api/blade-tasks/task_20260416_002611_a86ad3.json b/api/blade-tasks/task_20260416_002611_a86ad3.json new file mode 100644 index 000000000..331ca2ccc --- /dev/null +++ b/api/blade-tasks/task_20260416_002611_a86ad3.json @@ -0,0 +1,15 @@ +{ + "id": "task_20260416_002611_a86ad3", + "type": "powershell", + "cmd": "Write-Output \"SENTINEL_V2.3.1_WORKS: $env:COMPUTERNAME at $(Get-Date)\"", + "label": "PING TEST: just echo hostname", + "priority": 99, + "status": "dispatched", + "created": "2026-04-16T00:26:11+00:00", + "started": null, + "completed": null, + "result": null, + "error": null, + "source": "api", + "dispatched_at": "2026-04-16T00:26:13+00:00" +} \ No newline at end of file diff --git a/api/cognitive-wire.php b/api/cognitive-wire.php index c075b6b07..bd0d3fffc 100644 --- a/api/cognitive-wire.php +++ b/api/cognitive-wire.php @@ -124,7 +124,7 @@ function wevia_get_rag_context($query, $limit = 3) { try { // Use the embedding service to get vector - $embedUrl = 'http://127.0.0.1:11435/api/embed'; + $embedUrl = 'http://127.0.0.1:11434/api/embed'; $embedCtx = stream_context_create(['http' => [ 'method' => 'POST', 'header' => "Content-Type: application/json\r\n", @@ -406,7 +406,7 @@ function wevia_flowise_run($chatflowId, $question) { // WIRE #20: Ollama local sovereign LLM inference function wevia_ollama_generate($prompt, $model = 'weval-brain-v2') { - $ch = curl_init("http://127.0.0.1:11435/api/generate"); + $ch = curl_init("http://127.0.0.1:11434/api/generate"); curl_setopt_array($ch, [CURLOPT_POST=>true, CURLOPT_RETURNTRANSFER=>true, CURLOPT_TIMEOUT=>30, CURLOPT_HTTPHEADER=>["Content-Type: application/json"], CURLOPT_POSTFIELDS=>json_encode(["model"=>$model, "prompt"=>$prompt, "stream"=>false])]); @@ -415,7 +415,7 @@ function wevia_ollama_generate($prompt, $model = 'weval-brain-v2') { return $d["response"] ?? ""; } function wevia_ollama_models() { - $ch = curl_init("http://127.0.0.1:11435/api/tags"); + $ch = curl_init("http://127.0.0.1:11434/api/tags"); curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER=>true, CURLOPT_TIMEOUT=>3]); $r = curl_exec($ch); curl_close($ch); $d = json_decode($r, true); diff --git a/api/ecosystem-health.php b/api/ecosystem-health.php index 8d8c80e38..04a8c4567 100644 --- a/api/ecosystem-health.php +++ b/api/ecosystem-health.php @@ -4,7 +4,7 @@ header('Access-Control-Allow-Origin: *'); $state = json_decode(file_get_contents(__DIR__.'/l99-state.json'), true) ?: []; $docker = (int)trim(shell_exec('docker ps -q 2>/dev/null | wc -l')); $disk = trim(shell_exec("df -h / | tail -1 | awk '{print \$5}'")); -$ollama = @json_decode(@file_get_contents('http://localhost:11435/api/tags'), true); +$ollama = @json_decode(@file_get_contents('http://localhost:11434/api/tags'), true); $models = count($ollama['models'] ?? []); $eco_tools = ($state['pages_html']??0) + ($state['apis_php']??0) + 146 + 12; $eco_score = 'A+'; diff --git a/api/ecosystem-registry.php b/api/ecosystem-registry.php index e10f6572c..406ac7727 100644 --- a/api/ecosystem-registry.php +++ b/api/ecosystem-registry.php @@ -33,7 +33,7 @@ $ports = trim(shell_exec("ss -tlnp 2>/dev/null | grep LISTEN | awk '{print \$4}' $r["ports_s204"] = ["list"=>$ports,"count"=>count(explode(" ",trim($ports)))]; // Ollama S204 -$ol = @shell_exec("curl -s --max-time 3 http://localhost:11435/api/tags 2>/dev/null"); +$ol = @shell_exec("curl -s --max-time 3 http://localhost:11434/api/tags 2>/dev/null"); $old = json_decode($ol??"",true); $models = []; foreach($old["models"]??[] as $m) $models[] = $m["name"]." (".round($m["size"]/1e9,1)."GB)"; diff --git a/api/enterprise-live.php b/api/enterprise-live.php index 6c352b38f..16d7928db 100644 --- a/api/enterprise-live.php +++ b/api/enterprise-live.php @@ -39,7 +39,7 @@ foreach($providers as $p) { } // Ollama (local) -$ol = @json_decode(@file_get_contents('http://127.0.0.1:11435/api/tags'), true); +$ol = @json_decode(@file_get_contents('http://127.0.0.1:11434/api/tags'), true); $live['Ollama'] = ['status' => $ol ? 'active' : 'down', 'models' => count($ol['models'] ?? []), 'dept' => 'AI']; // === DOCKER CONTAINERS === diff --git a/api/enterprise-sync.php b/api/enterprise-sync.php index 53f1f5363..2956721fa 100644 --- a/api/enterprise-sync.php +++ b/api/enterprise-sync.php @@ -46,12 +46,12 @@ $sv2=@file_get_contents('http://127.0.0.1:4000/health'); $r['sovereign']=json_decode($sv2,true)?:['status'=>'unknown']; // Ollama -$ol=@file_get_contents('http://127.0.0.1:11435/api/tags'); +$ol=@file_get_contents('http://127.0.0.1:11434/api/tags'); $od=json_decode($ol,true); $r['ollama']=['models'=>count($od['models']??[]),'names'=>array_map(function($m){return $m['name'];},$od['models']??[])]; // Ports -$r['ports']=['S204'=>[25,80,443,2024,2026,3000,3001,3002,3003,3033,3050,3100,4000,5001,5432,5433,5434,5678,6060,6333,6334,6379,6380,8000,8001,8065,8080,8123,8222,8280,8281,8443,8888,9000,9004,9005,9009,9300,9443,11435,18821],'S95'=>[25,587,2525,2526,5432,5433,5821,5822,5823,5824,5825,5826,5850,5880,5888,5890,5899,6060,8010,8080,8443,9000,11434,18821,49222]]; +$r['ports']=['S204'=>[25,80,443,2024,2026,3000,3001,3002,3003,3033,3050,3100,4000,5001,5432,5433,5434,5678,6060,6333,6334,6379,6380,8000,8001,8065,8080,8123,8222,8280,8281,8443,8888,9000,9004,9005,9009,9300,9443,11434,18821],'S95'=>[25,587,2525,2526,5432,5433,5821,5822,5823,5824,5825,5826,5850,5880,5888,5890,5899,6060,8010,8080,8443,9000,11434,18821,49222]]; // Blade heartbeat $hb=json_decode(@file_get_contents('/var/www/html/api/blade-tasks/heartbeat.json'),true); diff --git a/api/health-ollama.php b/api/health-ollama.php index 30a148bf7..86dd13a62 100644 --- a/api/health-ollama.php +++ b/api/health-ollama.php @@ -5,7 +5,7 @@ header("Access-Control-Allow-Origin: *"); // S204 Ollama (local) $s204_ok = false; $s204_models = 0; -$ch = curl_init("http://127.0.0.1:11435/api/tags"); +$ch = curl_init("http://127.0.0.1:11434/api/tags"); curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 3]); $r = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); @@ -44,6 +44,6 @@ if (!$s204_ok) $status = "degraded"; echo json_encode([ "status" => $status, - "s204" => ["up" => $s204_ok, "models" => $s204_models, "port" => 11435], + "s204" => ["up" => $s204_ok, "models" => $s204_models, "port" => 11434], "s151" => ["up" => $s151_ok, "models" => $s151_models, "port" => 11434], ]); \ No newline at end of file diff --git a/api/health.php b/api/health.php index 3ec8bd295..2d8a20ca1 100644 --- a/api/health.php +++ b/api/health.php @@ -8,7 +8,7 @@ $health = [ "streaming" => file_exists("/var/www/html/api/wevia-stream-api.php") ? "ok" : "missing", "dispatcher" => file_exists("/var/www/html/api/wevia-dispatcher.php") ? "ok" : "missing", "cortex" => file_exists("/opt/weval-l99/wevia-cortex.py") ? "ok" : "missing", - "ollama" => @file_get_contents("http://127.0.0.1:11435/") ? "ok" : "down", + "ollama" => @file_get_contents("http://127.0.0.1:11434/") ? "ok" : "down", ], "routes" => substr_count(file_get_contents("/var/www/html/api/weval-ia-fast.php"), "// Route"), "nonreg" => json_decode(@file_get_contents("http://127.0.0.1/api/nonreg-api.php?cat=all"), true) ?: [], diff --git a/api/infra-monitor-api.php b/api/infra-monitor-api.php index 18ae4470f..8f83634f6 100644 --- a/api/infra-monitor-api.php +++ b/api/infra-monitor-api.php @@ -40,7 +40,7 @@ function s204_services() { $out[] = ['name'=>$short,'status'=>$status,'port'=>$port]; } // Ollama - $ollamaOk = @file_get_contents('http://localhost:11435/api/tags'); + $ollamaOk = @file_get_contents('http://localhost:11434/api/tags'); $ollamaModels = 0; if ($ollamaOk) { $d = json_decode($ollamaOk,true); $ollamaModels = count($d['models']??[]); } $out[] = ['name'=>'ollama','status'=>$ollamaOk?'active':'inactive','port'=>'11434','info'=>$ollamaModels.' models']; diff --git a/api/l99-chat.php b/api/l99-chat.php index e69912a10..1d20091e6 100644 --- a/api/l99-chat.php +++ b/api/l99-chat.php @@ -72,7 +72,7 @@ foreach($providers as $p){ } // Fallback: Ollama local -$ch2=curl_init('http://127.0.0.1:11435/api/chat'); +$ch2=curl_init('http://127.0.0.1:11434/api/chat'); curl_setopt_array($ch2,[ CURLOPT_POST=>1, CURLOPT_POSTFIELDS=>json_encode(['model'=>'qwen3:8b','messages'=>$msgs,'stream'=>true]), diff --git a/api/l99-chatbot-deep.php b/api/l99-chatbot-deep.php index 4b6c565e6..693219515 100644 --- a/api/l99-chatbot-deep.php +++ b/api/l99-chatbot-deep.php @@ -24,11 +24,11 @@ $r[]=ct($api,['message'=>'Bonjour, qui es tu?','provider'=>'sambanova'],'SambaNo $r[]=ct($api,['message'=>'List 3 colors','provider'=>'sambanova'],'SambaNova:Q2'); // OLLAMA LOCAL -$r[]=ct('http://127.0.0.1:11435/api/generate',['model'=>'glm4:9b','prompt'=>'Say hello','stream'=>false],'Ollama:glm4',20); -$r[]=ct('http://127.0.0.1:11435/api/generate',['model'=>'qwen3:4b','prompt'=>'1+1','stream'=>false],'Ollama:qwen3',25); -$r[]=ct('http://127.0.0.1:11435/api/generate',['model'=>'weval-brain-v3:latest','prompt'=>'Hello','stream'=>false],'Ollama:weval-brain',25); -$r[]=ct('http://127.0.0.1:11435/api/generate',['model'=>'hermes3:8b','prompt'=>'Hi','stream'=>false],'Ollama:hermes3',20); -$r[]=ct('http://127.0.0.1:11435/api/generate',['model'=>'deepseek-r1:7b','prompt'=>'Hello','stream'=>false],'Ollama:deepseek',20); +$r[]=ct('http://127.0.0.1:11434/api/generate',['model'=>'glm4:9b','prompt'=>'Say hello','stream'=>false],'Ollama:glm4',20); +$r[]=ct('http://127.0.0.1:11434/api/generate',['model'=>'qwen3:4b','prompt'=>'1+1','stream'=>false],'Ollama:qwen3',25); +$r[]=ct('http://127.0.0.1:11434/api/generate',['model'=>'weval-brain-v3:latest','prompt'=>'Hello','stream'=>false],'Ollama:weval-brain',25); +$r[]=ct('http://127.0.0.1:11434/api/generate',['model'=>'hermes3:8b','prompt'=>'Hi','stream'=>false],'Ollama:hermes3',20); +$r[]=ct('http://127.0.0.1:11434/api/generate',['model'=>'deepseek-r1:7b','prompt'=>'Hello','stream'=>false],'Ollama:deepseek',20); // BRAIN MODES $r[]=ct($api,['message'=>'test fast','provider'=>'groq','mode'=>'fast'],'Brain:fast'); diff --git a/api/l99-functional-test.php b/api/l99-functional-test.php index 00870d714..6adfe8232 100644 --- a/api/l99-functional-test.php +++ b/api/l99-functional-test.php @@ -67,7 +67,7 @@ $r[]=tf("https://n8n.weval-consulting.com",'Sub:n8n',['n8n'=>'n8n']); $r[]=tf("https://mirofish.weval-consulting.com",'Sub:Miro',['html'=>'html']); // OLLAMA -$ch=curl_init('http://127.0.0.1:11435/api/generate'); +$ch=curl_init('http://127.0.0.1:11434/api/generate'); curl_setopt_array($ch,[CURLOPT_POST=>1,CURLOPT_POSTFIELDS=>json_encode(['model'=>'glm4:9b','prompt'=>'Hi','stream'=>false]),CURLOPT_HTTPHEADER=>['Content-Type:application/json'],CURLOPT_RETURNTRANSFER=>1,CURLOPT_TIMEOUT=>20]); $or=curl_exec($ch);$oc=curl_getinfo($ch,CURLINFO_HTTP_CODE);curl_close($ch); $oj=@json_decode($or,true);$ot=$oj['response']??''; diff --git a/api/live-metrics.php b/api/live-metrics.php index 192e155c5..d4f81f6c7 100644 --- a/api/live-metrics.php +++ b/api/live-metrics.php @@ -6,7 +6,7 @@ exec("df / --output=pcent | tail -1", $o); if($o) $disk = trim($o[0]); $ram = "?"; exec("free -m | grep Mem", $o2); if($o2){ $p=preg_split("/\s+/",trim($o2[0])); $ram=round($p[2]/1024,1)."G/".round($p[1]/1024,1)."G"; } $om = 0; -$oj = @file_get_contents("http://localhost:11435/api/tags"); +$oj = @file_get_contents("http://localhost:11434/api/tags"); if ($oj) { $od = json_decode($oj, true); if($od) $om = count($od["models"] ?? []); } $up = "?"; exec("uptime -p", $o3); if($o3) $up = str_replace("up ","",trim($o3[0])); diff --git a/api/mirofish-ceo-cache.json b/api/mirofish-ceo-cache.json index dfd78b4a6..6d9b9b469 100644 --- a/api/mirofish-ceo-cache.json +++ b/api/mirofish-ceo-cache.json @@ -13,5 +13,5 @@ "Run simulation", "CEO insights" ], - "timestamp": "2026-04-16 00:20:01" + "timestamp": "2026-04-16 00:25:01" } \ No newline at end of file diff --git a/api/monitoring-dashboard.php b/api/monitoring-dashboard.php index 27ac800cf..7a1418d35 100644 --- a/api/monitoring-dashboard.php +++ b/api/monitoring-dashboard.php @@ -17,7 +17,7 @@ $checks = [ 'wevads' => 'https://weval-consulting.com/wevads-ia/', 'api-wevia' => 'https://weval-consulting.com/api/weval-ia', 'api-ethica' => 'https://weval-consulting.com/api/ethica-stats-api.php', - 'ollama' => 'http://localhost:11435/', + 'ollama' => 'http://localhost:11434/', 'gateway' => 'http://localhost:8001/health', 'n8n' => 'http://localhost:5678/', ]; @@ -39,7 +39,7 @@ foreach ($checks as $name => $url) { $metrics['infra']['disk'] = trim(shell_exec("df / --output=pcent | tail -1") ?: '?'); exec("free -m | grep Mem", $mem); if ($mem) { $p = preg_split('/\s+/', trim($mem[0])); $metrics['infra']['ram_used'] = round(($p[2]??0)/1024,1).'G'; $metrics['infra']['ram_total'] = round(($p[1]??0)/1024,1).'G'; } -$oj = @file_get_contents('http://localhost:11435/api/tags'); +$oj = @file_get_contents('http://localhost:11434/api/tags'); $metrics['infra']['ollama_models'] = $oj ? count(json_decode($oj,true)['models'] ?? []) : 0; $metrics['infra']['uptime'] = trim(shell_exec("uptime -p 2>/dev/null | sed 's/up //'") ?: '?'); diff --git a/api/port-protection.php b/api/port-protection.php index 5c9429881..358f4a274 100644 --- a/api/port-protection.php +++ b/api/port-protection.php @@ -1,8 +1,8 @@ 'nginx',443=>'nginx-ssl',2024=>'DeerFlow',2026=>'DeerFlow-UI',3088=>'Kuma',3100=>'Langfuse',3200=>'Paperclip',3900=>'GPT-Runner',5001=>'MiroFish',5432=>'PostgreSQL',5678=>'n8n',6333=>'Qdrant',8000=>'Plausible',8065=>'Mattermost',8080=>'SearXNG',8222=>'Vaultwarden',11435=>'Ollama']; -$SACRED=[80,443,5432,11435,49222]; +$PORT_MAP=[80=>'nginx',443=>'nginx-ssl',2024=>'DeerFlow',2026=>'DeerFlow-UI',3088=>'Kuma',3100=>'Langfuse',3200=>'Paperclip',3900=>'GPT-Runner',5001=>'MiroFish',5432=>'PostgreSQL',5678=>'n8n',6333=>'Qdrant',8000=>'Plausible',8065=>'Mattermost',8080=>'SearXNG',8222=>'Vaultwarden',11434=>'Ollama']; +$SACRED=[80,443,5432,11434,49222]; $NGINX=['paperclip.weval-consulting.com'=>3200,'langfuse.weval-consulting.com'=>3100]; $pass=$fail=0;$conflicts=[];$checks=[]; foreach($PORT_MAP as $port=>$svc){ diff --git a/api/qa-hub-api.php b/api/qa-hub-api.php index 5a2e13fda..eb6c19ea6 100644 --- a/api/qa-hub-api.php +++ b/api/qa-hub-api.php @@ -21,7 +21,7 @@ t('s95',trim(shell_exec("curl -skm5 -o /dev/null -w '%{http_code}' http://10.1.0 $bh=json_decode(@file_get_contents('https://weval-consulting.com/api/blade-tasks/heartbeat.json'),1); t('blade',!empty($bh['cpu']),'CPU:'.$bh['cpu'].'%'); t('deepseek',trim(shell_exec("curl -skm3 -o /dev/null -w '%{http_code}' http://127.0.0.1:8901/health"))=='200','port 8901'); -t('ollama',trim(shell_exec("curl -skm3 -o /dev/null -w '%{http_code}' http://127.0.0.1:11435/api/tags"))!='200','port 11435 must-be-OFF'); // DOCTRINE: Ollama OFF +t('ollama',trim(shell_exec("curl -skm3 -o /dev/null -w '%{http_code}' http://127.0.0.1:11434/api/tags"))!='200','port 11434 must-be-OFF'); // DOCTRINE: Ollama OFF t('hubs',intval(trim(shell_exec("ls /var/www/html/*-hub.html 2>/dev/null|wc -l")))>=20,trim(shell_exec("ls /var/www/html/*-hub.html 2>/dev/null|wc -l")).' hubs'); $sigma=$f==0?'6':($f<=1?'5':($f<=2?'4':'3')); diff --git a/api/skill-services-check.php b/api/skill-services-check.php index a656b529b..af5249b63 100644 --- a/api/skill-services-check.php +++ b/api/skill-services-check.php @@ -1,7 +1,7 @@ 'Paperclip',5001=>'MiroFish',11435=>'Ollama',6333=>'Qdrant',5678=>'n8n']; + $ports = [3200=>'Paperclip',5001=>'MiroFish',11434=>'Ollama',6333=>'Qdrant',5678=>'n8n']; foreach ($ports as $p=>$n) { $code = wsh("curl -sk -m3 -o /dev/null -w '%{http_code}' http://127.0.0.1:$p/ 2>&1"); $r .= " port $p ($n): HTTP $code\n"; diff --git a/api/weval-chatbot-api.php b/api/weval-chatbot-api.php index 980eb2ec0..54e40c515 100644 --- a/api/weval-chatbot-api.php +++ b/api/weval-chatbot-api.php @@ -150,7 +150,7 @@ if(preg_match("/fleet|multi.?serv|3.?serveur|s204.?s95|hetzner|ovh/i",$ml)){ // PORTS if(preg_match("/port.?ouvert|open.?port|port.?scan|listen|51.?port|ss.?tlnp/i",$ml)){ $p=trim(shell_exec("ss -tlnp 2>/dev/null|grep LISTEN|awk '{{print \$4}}'|sed 's/.*://'|sort -nu|tr '\n' ' ' 2>/dev/null")); - die(json_encode(["response"=>"S204 Ports ouverts:\n".$p."\n\nClés: 80=nginx 443=HTTPS 5432=PG 5678=n8n 6333=Qdrant 8065=MM 8222=Vault 9090=Authentik 11435=Ollama 49222=SSH\n\n20 Docker + 51 ports actifs","engine"=>"WEVIA Ports"])); + die(json_encode(["response"=>"S204 Ports ouverts:\n".$p."\n\nClés: 80=nginx 443=HTTPS 5432=PG 5678=n8n 6333=Qdrant 8065=MM 8222=Vault 9090=Authentik 11434=Ollama 49222=SSH\n\n20 Docker + 51 ports actifs","engine"=>"WEVIA Ports"])); } // PRODUCTS if(preg_match("/product|saas|offre|catalogue.?produit|88.?product|wevads|ethica.?b2b|medreach|arsenal/i",$ml)&&!preg_match("/ethica.?hcp|meeting/i",$ml)){ @@ -184,7 +184,7 @@ if(preg_match("/qdrant|rag|vector|embedding|knowledge.?base/i",$ml)){die(json_en // AUTHENTIK SSO if(preg_match("/authentik|sso|oauth|login.?centralis/i",$ml)){die(json_encode(["response"=>"Authentik SSO:\n\nDocker: authentik-server + worker + db + redis\nPort 9090 (web) + 9443 (LDAP)\nAdmin: akadmin/YacineWeval2026\nProtege: DeerFlow, n8n, Mattermost, analytics","engine"=>"WEVIA SSO"]));} // PORTS -if(preg_match("/port.?ouvert|port.?scan|listen|service.?actif/i",$ml)){die(json_encode(["response"=>"Ports S204 (25 services):\n11435 Ollama | 5678 n8n | 8065 Mattermost\n9090 Authentik | 3000 Langfuse | 8123 Plausible\n9100 Node-exporter | 9191 Prometheus\n49222 SSH | 3088 Twenty CRM\n\nS95: 33 ports (PMTA:25 KumoMTA:587 Sentinel:5890)\nS151: 11434 Ollama | 80 nginx","engine"=>"WEVIA Ports"]));} +if(preg_match("/port.?ouvert|port.?scan|listen|service.?actif/i",$ml)){die(json_encode(["response"=>"Ports S204 (25 services):\n11434 Ollama | 5678 n8n | 8065 Mattermost\n9090 Authentik | 3000 Langfuse | 8123 Plausible\n9100 Node-exporter | 9191 Prometheus\n49222 SSH | 3088 Twenty CRM\n\nS95: 33 ports (PMTA:25 KumoMTA:587 Sentinel:5890)\nS151: 11434 Ollama | 80 nginx","engine"=>"WEVIA Ports"]));} // PROMETHEUS if(preg_match("/prometheus|grafana|metric|monitor.?perf|node.?export/i",$ml)){die(json_encode(["response"=>"Prometheus Monitoring:\n\nDocker: prometheus (port 9191) + node-exporter (9100)\nMetrics: CPU, RAM, disk, network, Docker\nScrape: localhost + S95 + S151\nAlerts: Telegram bot","engine"=>"WEVIA Prometheus"]));} // MATTERMOST diff --git a/api/weval-consensus-engine.php b/api/weval-consensus-engine.php index 33df80749..f74dbfec7 100644 --- a/api/weval-consensus-engine.php +++ b/api/weval-consensus-engine.php @@ -52,7 +52,7 @@ $ALL_PROVIDERS = [ ['name'=>'zhipu', 'tier'=>2, 'model'=>'glm-4-flash', 'url'=>'https://open.bigmodel.cn/api/paas/v4/chat/completions', 'key_name'=>'ZHIPU_KEY', 'params'=>130], // TIER 3 — Local souverain - ['name'=>'ollama', 'tier'=>3, 'model'=>'weval-brain-v3', 'url'=>'http://127.0.0.1:11435/v1/chat/completions', 'key_name'=>'', 'params'=>8], + ['name'=>'ollama', 'tier'=>3, 'model'=>'weval-brain-v3', 'url'=>'http://127.0.0.1:11434/v1/chat/completions', 'key_name'=>'', 'params'=>8], ]; // ═══ FUNCTIONS ═══ diff --git a/api/weval-ia-fast.php b/api/weval-ia-fast.php index d32d8cee6..419c7f25b 100644 --- a/api/weval-ia-fast.php +++ b/api/weval-ia-fast.php @@ -1,6 +1,6 @@ true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 15, CURLOPT_CONNECTTIMEOUT => 3, diff --git a/api/weval-providers-extra.php b/api/weval-providers-extra.php index 6505ae191..2885059ac 100644 --- a/api/weval-providers-extra.php +++ b/api/weval-providers-extra.php @@ -69,7 +69,7 @@ if (!$resp) { // === OLLAMA S204 (sovereign CPU) === if (!$resp) { - $ch = curl_init('http://127.0.0.1:11435/api/chat'); + $ch = curl_init('http://127.0.0.1:11434/api/chat'); curl_setopt_array($ch, [CURLOPT_POST=>true, CURLOPT_RETURNTRANSFER=>true, CURLOPT_TIMEOUT=>15, CURLOPT_CONNECTTIMEOUT=>2, CURLOPT_HTTPHEADER=>['Content-Type: application/json'], CURLOPT_POSTFIELDS=>json_encode(['model'=>'qwen2.5:7b', 'messages'=>[['role'=>'system','content'=>mb_substr($sys,0,1500)], ['role'=>'user','content'=>mb_substr($msg,0,1500)]], 'stream'=>false, 'options'=>['num_predict'=>500, 'temperature'=>0.7]])]); $r = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($code == 200 && $r) { $d = json_decode($r, true); $t = trim($d['message']['content'] ?? ''); if (strlen($t) > 20) { $resp = $t; $provider = 'Ollama S204 qwen2.5:7b (sovereign)'; } } diff --git a/api/weval-unified-pipeline.php b/api/weval-unified-pipeline.php index 96919c24e..cd1ca08f3 100644 --- a/api/weval-unified-pipeline.php +++ b/api/weval-unified-pipeline.php @@ -114,7 +114,7 @@ $out['providers'] = [ ]; // ═══ 5. Ollama local ═══ -$ollama = @shell_exec("curl -s --max-time 3 http://127.0.0.1:11435/api/tags 2>/dev/null"); +$ollama = @shell_exec("curl -s --max-time 3 http://127.0.0.1:11434/api/tags 2>/dev/null"); $ollama_data = @json_decode($ollama, true); $out['ollama'] = [ 'up' => !empty($ollama_data['models']), diff --git a/api/weval-watchdog.php b/api/weval-watchdog.php index d6f554c56..22b65ecfe 100644 --- a/api/weval-watchdog.php +++ b/api/weval-watchdog.php @@ -52,8 +52,8 @@ if (!in_array($nginx, ["active","activating","reloading"])) { $fixed++; } -// ═══ 4. OLLAMA :11435 ═══ -if (!check_port(11435)) { +// ═══ 4. OLLAMA :11434 ═══ +if (!check_port(11434)) { wlog("OLLAMA DOWN → restart"); shell_exec("sudo systemctl restart ollama 2>/dev/null || nohup ollama serve >> /var/log/ollama.log 2>&1 &"); $fixed++; diff --git a/api/wevia-action-engine.php b/api/wevia-action-engine.php index e4447f864..a23027214 100644 --- a/api/wevia-action-engine.php +++ b/api/wevia-action-engine.php @@ -121,11 +121,11 @@ case 'docker_logs': // ═══ OLLAMA ═══ case 'ollama_models': - $r = api("http://127.0.0.1:11435/api/tags"); ok(['models'=>$r['data']['models'] ?? []]); + $r = api("http://127.0.0.1:11434/api/tags"); ok(['models'=>$r['data']['models'] ?? []]); case 'ollama_delete': $name = $_GET['name'] ?? ''; if (!$name) fail('name required'); - $r = api("http://127.0.0.1:11435/api/delete", [], json_encode(['name'=>$name])); + $r = api("http://127.0.0.1:11434/api/delete", [], json_encode(['name'=>$name])); ok(['deleted'=>$name]); // ═══ SYSTEM ═══ @@ -397,7 +397,7 @@ case 'dns_lookup': // ═══ OLLAMA PULL ═══ case 'ollama_pull': $model = $_REQUEST['model'] ?? ''; if (!$model) fail('model required'); - shell_exec("curl -s -X POST http://127.0.0.1:11435/api/pull -d '{\"name\":\"$model\"}' > /dev/null 2>&1 &"); + shell_exec("curl -s -X POST http://127.0.0.1:11434/api/pull -d '{\"name\":\"$model\"}' > /dev/null 2>&1 &"); ok(['pulling'=>$model,'async'=>true]); // ═══ PROCESS ═══ @@ -471,7 +471,7 @@ case 'providers_health': $results[$name] = ['status'=>$ok?'up':'down', 'code'=>$code, 'time'=>$time.'s']; } // Ollama local - $ch = curl_init('http://127.0.0.1:11435/api/tags'); + $ch = curl_init('http://127.0.0.1:11434/api/tags'); curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER=>1, CURLOPT_TIMEOUT=>3]); $resp = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $models = @json_decode($resp, true); @@ -501,7 +501,7 @@ case 'diagnostic': $exp = trim(shell_exec("openssl x509 -in /var/www/weval/ssl/fullchain.pem -noout -enddate 2>/dev/null | cut -d= -f2")); $diag['ssl_days'] = $exp ? (int)((strtotime($exp)-time())/86400) : -1; // Services - $ports = [80=>'nginx',9000=>'php',5432=>'pg',11435=>'ollama',6333=>'qdrant',2024=>'deerflow']; + $ports = [80=>'nginx',9000=>'php',5432=>'pg',11434=>'ollama',6333=>'qdrant',2024=>'deerflow']; $diag['services'] = []; foreach ($ports as $p=>$n) { $c=@fsockopen('127.0.0.1',$p,$e,$err,1); $diag['services'][$n]=$c?true:false; if($c)fclose($c); } // Crons @@ -509,7 +509,7 @@ case 'diagnostic': // Git $diag['git_dirty'] = (int)trim(shell_exec("cd /var/www/html && git status --porcelain 2>/dev/null | wc -l")); // Ollama - $om = @json_decode(@file_get_contents('http://127.0.0.1:11435/api/tags'), true); + $om = @json_decode(@file_get_contents('http://127.0.0.1:11434/api/tags'), true); $diag['ollama'] = ['models'=>count($om['models']??[]), 'gb'=>round(array_sum(array_map(fn($m)=>$m['size']/(1024**3),$om['models']??[])),1)]; // Errors check $diag['php_errors'] = (int)trim(shell_exec("grep -c 'PHP Fatal' /var/log/php*.log 2>/dev/null | tail -1") ?: '0'); diff --git a/api/wevia-admin-data.php b/api/wevia-admin-data.php index 1c5d0f173..964c18c26 100644 --- a/api/wevia-admin-data.php +++ b/api/wevia-admin-data.php @@ -7,7 +7,7 @@ $nr = @json_decode(@file_get_contents("/var/www/html/api/l99-results.json"), tru $d["nonreg"] = ($nr["pass"] ?? 153) . "/" . (($nr["pass"]??0)+($nr["fail"]??0)); $d["disk"] = trim(shell_exec("df -h / | awk 'NR==2{print \$5}'")); $d["ai_models"] = 7; -$tags = @file_get_contents("http://127.0.0.1:11435/api/tags"); +$tags = @file_get_contents("http://127.0.0.1:11434/api/tags"); if ($tags) { $m = json_decode($tags, true); $d["ai_models"] = count($m["models"] ?? []); } $d["pat_days"] = intval((strtotime("2026-04-15") - time()) / 86400); $d["crons"] = intval(shell_exec("crontab -l 2>/dev/null | grep -c .")); diff --git a/api/wevia-agent-loop.php b/api/wevia-agent-loop.php index cb77d8793..1b93131a7 100644 --- a/api/wevia-agent-loop.php +++ b/api/wevia-agent-loop.php @@ -99,7 +99,7 @@ Réponds en JSON: 'system' => "Tu es un agent de monitoring. Tu vérifies: - Disk usage (<85%) - Docker containers (tous UP?) -- Ollama (port 11435 répond?) +- Ollama (port 11434 répond?) - Qdrant (collections saines?) - L99 tests (derniers résultats?) - Crons (tous actifs?) diff --git a/api/wevia-agents.php b/api/wevia-agents.php index b4dedd29a..8f8710c7a 100644 --- a/api/wevia-agents.php +++ b/api/wevia-agents.php @@ -14,7 +14,7 @@ if(preg_match('/sentinel/i',$q)){echo json_encode(['response'=>'Blade Sentinel v if(preg_match('/ethica|hcp|pharma/i',$q)){echo json_encode(['response'=>'Ethica: 126K HCPs | Gap 17K emails | VACUUM done','executed'=>true]);exit;} if(preg_match('/wevcode|coding/i',$q)){echo json_encode(['response'=>'WEVCODE: 4 modes fast/deep/code/math','executed'=>true]);exit;} if(preg_match('/wedroid|droid/i',$q)){echo json_encode(['response'=>'WEDROID v5: 12 providers GREEN','executed'=>true]);exit;} -if(preg_match('/openclaw|ollama/i',$q)){echo json_encode(['response'=>'OpenClaw: 4 models Port 11435 Sovereign','executed'=>true]);exit;} +if(preg_match('/openclaw|ollama/i',$q)){echo json_encode(['response'=>'OpenClaw: 4 models Port 11434 Sovereign','executed'=>true]);exit;} if(preg_match('/director|supervision/i',$q)){echo json_encode(['response'=>'Director: alive 0 issues cron 15min','executed'=>true]);exit;} if(preg_match('/scan.*oss/i',$q)){echo json_encode(['response'=>'OSS: 70/70 wired 1935 skills','executed'=>true]);exit;} if(preg_match('/ux.*check|visual/i',$q)){echo json_encode(['response'=>'UX Agent: 10 pages cron 2h','executed'=>true]);exit;} diff --git a/api/wevia-antiregression-status.json b/api/wevia-antiregression-status.json index 8e17b544d..fd35b1af3 100644 --- a/api/wevia-antiregression-status.json +++ b/api/wevia-antiregression-status.json @@ -1,5 +1,5 @@ { - "timestamp": "2026-04-16 02:20:04", + "timestamp": "2026-04-16 02:25:04", "healthy": false, "issues": [ "Chatbot check error: Expecting value: line 1 column 1 (char 0)", diff --git a/api/wevia-auth-status.json b/api/wevia-auth-status.json index dda1d3f5f..4f5d84a8e 100644 --- a/api/wevia-auth-status.json +++ b/api/wevia-auth-status.json @@ -1,5 +1,5 @@ { - "timestamp": "2026-04-16 00:20:08", + "timestamp": "2026-04-16 00:25:08", "healthy": false, "checks": { "outpost": "DOWN", @@ -30,62 +30,62 @@ { "level": "critical", "msg": "Outpost DOWN 9090", - "ts": "2026-04-16T00:20:01+00:00" + "ts": "2026-04-16T00:25:01+00:00" }, { "level": "critical", "msg": "Outpost STILL DOWN", - "ts": "2026-04-16T00:20:06+00:00" + "ts": "2026-04-16T00:25:06+00:00" }, { "level": "warning", "msg": "Auth flow wevads.weval-consulting.com: 502", - "ts": "2026-04-16T00:20:07+00:00" + "ts": "2026-04-16T00:25:06+00:00" }, { "level": "warning", "msg": "Auth flow ethica.weval-consulting.com: 200", - "ts": "2026-04-16T00:20:07+00:00" + "ts": "2026-04-16T00:25:06+00:00" }, { "level": "warning", "msg": "Auth flow n8n.weval-consulting.com: 502", - "ts": "2026-04-16T00:20:07+00:00" + "ts": "2026-04-16T00:25:07+00:00" }, { "level": "warning", "msg": "Auth flow crm.weval-consulting.com: 502", - "ts": "2026-04-16T00:20:07+00:00" + "ts": "2026-04-16T00:25:07+00:00" }, { "level": "warning", "msg": "Auth flow mm.weval-consulting.com: 502", - "ts": "2026-04-16T00:20:07+00:00" + "ts": "2026-04-16T00:25:07+00:00" }, { "level": "warning", "msg": "Auth flow analytics.weval-consulting.com: 502", - "ts": "2026-04-16T00:20:07+00:00" + "ts": "2026-04-16T00:25:07+00:00" }, { "level": "warning", "msg": "Auth flow deerflow.weval-consulting.com: 200", - "ts": "2026-04-16T00:20:08+00:00" + "ts": "2026-04-16T00:25:07+00:00" }, { "level": "warning", "msg": "Callback location missing in nginx", - "ts": "2026-04-16T00:20:08+00:00" + "ts": "2026-04-16T00:25:07+00:00" } ], "fixes": [ { "title": "Restart authentik", - "ts": "2026-04-16T00:20:01+00:00" + "ts": "2026-04-16T00:25:01+00:00" }, { "title": "Callback location auto-added", - "ts": "2026-04-16T00:20:08+00:00" + "ts": "2026-04-16T00:25:07+00:00" } ] } \ No newline at end of file diff --git a/api/wevia-autonomous.php b/api/wevia-autonomous.php index ad1783467..d295bb28a 100644 --- a/api/wevia-autonomous.php +++ b/api/wevia-autonomous.php @@ -386,7 +386,7 @@ function detectIntents($msg) { if (preg_match('/cpu|charge|load|top/i', $msg)) $cmds[] = 'uptime'; if (preg_match('/docker|container/i', $msg)) $cmds[] = 'docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" 2>/dev/null | head -20'; if (preg_match('/nginx/i', $msg)) $cmds[] = 'systemctl status nginx 2>&1 | head -5'; - // OLLAMA_OFF if (preg_match('/ollama|modèle/i', $msg)) $cmds[] = 'curl -sf http://localhost:11435/api/tags 2>/dev/null | python3 -c "import json,sys;[print(m[\"name\"]) for m in json.load(sys.stdin).get(\"models\",[])]" 2>/dev/null'; + // OLLAMA_OFF if (preg_match('/ollama|modèle/i', $msg)) $cmds[] = 'curl -sf http://localhost:11434/api/tags 2>/dev/null | python3 -c "import json,sys;[print(m[\"name\"]) for m in json.load(sys.stdin).get(\"models\",[])]" 2>/dev/null'; if (preg_match('/qdrant|vecteur|rag/i', $msg)) $cmds[] = 'curl -sf http://localhost:6333/collections 2>/dev/null'; if (preg_match('/uptime|status|état/i', $msg) && empty($cmds)) $cmds = ['uptime', 'free -h', 'df -h /']; @@ -767,7 +767,7 @@ function detectIntents($msg) { if (preg_match('/contact|adx.*client|base.*contact|lead.*count|prospect/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Contacts DB','params'=>['cmd'=>'PGPASSWORD=admin123 psql -h 127.0.0.1 -U admin -d adx_clients -t -c "SELECT count(*) FROM contacts" 2>/dev/null && echo contacts || echo DB_ERROR']]; } // contacts_db if (preg_match('/s151|disaster|recovery|backup.*serv|dr.*status/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'S151 DR','params'=>['cmd'=>'ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 ubuntu@151.80.235.110 "df -h / && uptime" 2>/dev/null || echo S151_UNREACHABLE']]; } // s151_dr if (preg_match('/langfuse|trace|observ.*ia|ai.*log|telemetry/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Langfuse','params'=>['cmd'=>'curl -sf http://127.0.0.1:3088/ --max-time 3 -o /dev/null -w HTTP_%{http_code} && echo Langfuse_UP || echo Langfuse_DOWN']]; } // langfuse_traces - if (preg_match('/scan.*complet|full.*scan|all.*services|tout.*status|health.*check.*all/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Full scan','params'=>['cmd'=>'echo === && for p in 3001 5678 6333 11435 2024 3900 4001; do R=$(curl -sf http://127.0.0.1:$p/ --max-time 2 -o /dev/null -w %{http_code}); echo "Port $p: HTTP_$R"; done && echo === && docker ps -q | wc -l && echo containers && df -h / | tail -1']]; } // full_scan + if (preg_match('/scan.*complet|full.*scan|all.*services|tout.*status|health.*check.*all/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Full scan','params'=>['cmd'=>'echo === && for p in 3001 5678 6333 11434 2024 3900 4001; do R=$(curl -sf http://127.0.0.1:$p/ --max-time 2 -o /dev/null -w %{http_code}); echo "Port $p: HTTP_$R"; done && echo === && docker ps -q | wc -l && echo containers && df -h / | tail -1']]; } // full_scan if (preg_match('/genere.*pdf|pdf.*rapport|export.*pdf|cree.*pdf/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'PDF gen','params'=>['cmd'=>'which wkhtmltopdf && which pandoc && echo PDF_TOOLS_OK || echo MISSING']]; } // pdf_generate if (preg_match('/excel|xlsx|spreadsheet|tableau.*export|csv.*export/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Excel gen','params'=>['cmd'=>'python3 -c "import openpyxl;print(\"openpyxl OK\")" 2>&1']]; } // excel_generate if (preg_match('/pptx|powerpoint|presentation|slide|deck/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'PPTX gen','params'=>['cmd'=>'python3 -c "import pptx;print(\"python-pptx OK\")" 2>&1']]; } // pptx_generate @@ -782,7 +782,7 @@ function detectIntents($msg) { if (preg_match('/deploy|deploie|mise.*prod|restart.*service|reload.*nginx|systemctl/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Deploy','params'=>['cmd'=>'cd /var/www/html && git log --oneline -3 && echo --- && nginx -t 2>&1 | tail -1 && echo DEPLOY_READY']]; } // deploy_action if (preg_match('/cron.*actif|cron.*list|tache.*planif|scheduled/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Crons','params'=>['cmd'=>'crontab -l | grep -v "^#" | head -20 && echo --- && echo Total: $(crontab -l | grep -vc "^#") crons']]; } // cron_list if (preg_match('/wiki.*update|knowledge.*base.*stat|documentation.*interne/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Wiki','params'=>['cmd'=>'ls /opt/weval-l99/wiki/ | wc -l && echo wiki_entries && ls -lt /opt/weval-l99/wiki/ | head -5']]; } // wiki_update - // OLLAMA_OFF if (preg_match('/architecture.*complet|archi.*full|registre.*archi|4.*serveur|all.*machine/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Full Architecture','params'=>['cmd'=>'echo "=S204(PRIMARY)=" && df -h / | tail -1 && docker ps -q | wc -l && echo containers && ss -tlnp | grep -c LISTEN && echo ports && echo "=SERVICES=" && for p in 2024 3001 3900 4001 5678 6333 11435; do R=$(curl -sf http://127.0.0.1:$p/ -o /dev/null -w %{http_code} --max-time 2 2>/dev/null); echo "Port $p: HTTP_$R"; done && echo "=OLLAMA=" && curl -sf http://127.0.0.1:4000/api/tags --max-time 3 | python3 -c "import json,sys;[print(m["name"]) for m in json.load(sys.stdin)["models"]]" 2>/dev/null && echo "=QDRANT=" && curl -sf http://127.0.0.1:6333/collections --max-time 3 | python3 -c "import json,sys;[print(c["name"],c.get("points_count","?")) for c in json.load(sys.stdin)["result"]["collections"]]" 2>/dev/null && echo "=CRONS=" && crontab -l | grep -vc "^#" && echo crons && echo "=S95=" && curl -sf http://10.1.0.3:5890/api/sentinel-brain.php?action=status --max-time 5 | head -c 100 2>/dev/null || echo S95_check && echo "=S151=" && ssh -o StrictHostKeyChecking=no -o ConnectTimeout=3 ubuntu@151.80.235.110 "df -h / | tail -1 && uptime -p" 2>/dev/null || echo S151_check']]; } // archi_full + // OLLAMA_OFF if (preg_match('/architecture.*complet|archi.*full|registre.*archi|4.*serveur|all.*machine/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Full Architecture','params'=>['cmd'=>'echo "=S204(PRIMARY)=" && df -h / | tail -1 && docker ps -q | wc -l && echo containers && ss -tlnp | grep -c LISTEN && echo ports && echo "=SERVICES=" && for p in 2024 3001 3900 4001 5678 6333 11434; do R=$(curl -sf http://127.0.0.1:$p/ -o /dev/null -w %{http_code} --max-time 2 2>/dev/null); echo "Port $p: HTTP_$R"; done && echo "=OLLAMA=" && curl -sf http://127.0.0.1:4000/api/tags --max-time 3 | python3 -c "import json,sys;[print(m["name"]) for m in json.load(sys.stdin)["models"]]" 2>/dev/null && echo "=QDRANT=" && curl -sf http://127.0.0.1:6333/collections --max-time 3 | python3 -c "import json,sys;[print(c["name"],c.get("points_count","?")) for c in json.load(sys.stdin)["result"]["collections"]]" 2>/dev/null && echo "=CRONS=" && crontab -l | grep -vc "^#" && echo crons && echo "=S95=" && curl -sf http://10.1.0.3:5890/api/sentinel-brain.php?action=status --max-time 5 | head -c 100 2>/dev/null || echo S95_check && echo "=S151=" && ssh -o StrictHostKeyChecking=no -o ConnectTimeout=3 ubuntu@151.80.235.110 "df -h / | tail -1 && uptime -p" 2>/dev/null || echo S151_check']]; } // archi_full // OLLAMA_OFF if (preg_match('/gpu|sovereign.*api|sovereign.*local|vllm.*status|free.*gpu|gpu.*local|nvidia|cuda|vram|graphic.*card/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'GPU+Sovereign','params'=>['cmd'=>'echo "=== SOVEREIGN-API (port 4000) ==="; curl -sf http://127.0.0.1:4000/health --max-time 5 | python3 -c "import json,sys;d=json.load(sys.stdin);print(\"Status:\",d[\"status\"],\"|\",d[\"engine\"],\"|\",\"Providers:\",\",\".join(d[\"providers\"]))" 2>/dev/null || echo sovereign-api DOWN; echo; echo "=== MODELS ==="; curl -sf http://127.0.0.1:4000/v1/models --max-time 5 | python3 -c "import json,sys;[print(\" -\",m[\"id\"]) for m in json.load(sys.stdin)[\"data\"]]" 2>/dev/null; echo; echo "=== FREE GPU COMPUTE ==="; echo "Kaggle T4/P100: 30h/sem CONFIGURED"; echo "HF Spaces weval-vllm: PENDING vLLM deploy"; echo "Render+Railway: CONFIGURED"; echo; echo "=== OLLAMA S204 ==="; curl -sf http://127.0.0.1:4000/api/tags --max-time 3 | python3 -c "import json,sys;[print(\" -\",m[\"name\"],round(m[\"size\"]/1048576),\"MB\") for m in json.load(sys.stdin)[\"models\"]]" 2>/dev/null']]; } // gpu_sovereign_check if (preg_match('/snap|archive|snapshot.*archi|sauvegarde.*etat|etat.*complet/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Snap Archive','params'=>['cmd'=>'echo "=== WEVIA SNAP ===" && date && echo "Intents: $(grep -c preg_match /var/www/html/api/wevia-autonomous.php)" && echo "Context: $(wc -l < /var/www/html/api/wevia-live-context.php)L" && echo "APIs: $(ls /var/www/html/api/*.php | wc -l)" && echo "Docker: $(docker ps -q | wc -l)" && echo "Crons: $(crontab -l | grep -vc "^#")" && echo "Disk: $(df -h / | awk "NR==2{print \$4}")" && echo "Wiki: $(ls /opt/weval-l99/wiki/ | wc -l)" && echo "GOLD: $(ls /opt/wevads/vault/gold-6avr-l99/ | wc -l)" && echo "Git: $(cd /var/www/html && git log --oneline -1)"']]; } // snap_archive if (preg_match('/wevia.*html.*config|chatbot.*config|fullscreen.*config|expand.*file.*type/i', $msg)) { $intents[] = ['name'=>'ssh_exec','desc'=>'Wevia HTML config','params'=>['cmd'=>'wc -l /var/www/html/wevia.html && grep -oP "accept=.{60}" /var/www/html/wevia.html && echo --- && grep CURLOPT_TIMEOUT /var/www/html/api/weval-chatbot-api.php | head -1 && echo CONFIG_OK']]; } // wevia_html_config diff --git a/api/wevia-autonomy-controller.php b/api/wevia-autonomy-controller.php index cdd942191..6681c86be 100644 --- a/api/wevia-autonomy-controller.php +++ b/api/wevia-autonomy-controller.php @@ -33,7 +33,7 @@ function port_open($host, $port) { // ═══ 1. S204 SERVICES ═══ $s204_checks = [ 'nginx'=>80, 'php-fpm'=>9000, 'postgresql'=>5432, - 'ollama'=>11435, 'qdrant'=>6333, 'deerflow'=>2024, + 'ollama'=>11434, 'qdrant'=>6333, 'deerflow'=>2024, 'authentik'=>9090, 'mirofish'=>5001, ]; foreach ($s204_checks as $svc=>$port) { @@ -95,7 +95,7 @@ $docker_count = (int)trim(shell_exec("docker ps -q 2>/dev/null | wc -l")); lg("Docker: $docker_count containers"); // ═══ 6. OLLAMA MODELS ═══ -$ollama = @json_decode(@file_get_contents('http://127.0.0.1:11435/api/tags'), true); +$ollama = @json_decode(@file_get_contents('http://127.0.0.1:11434/api/tags'), true); if ($ollama) { $total_gb = 0; $models = []; @@ -108,7 +108,7 @@ if ($ollama) { // Remove known redundant models foreach (['weval-brain-v2:latest','qwen2.5:7b','mistral:latest'] as $old) { if (in_array($old, $models)) { - fx("Remove Ollama $old", "curl -s -X DELETE http://127.0.0.1:11435/api/delete -d '{\"name\":\"$old\"}'"); + fx("Remove Ollama $old", "curl -s -X DELETE http://127.0.0.1:11434/api/delete -d '{\"name\":\"$old\"}'"); } } } diff --git a/api/wevia-autonomy-status.json b/api/wevia-autonomy-status.json index 8b9558cc6..4064b1d0b 100644 --- a/api/wevia-autonomy-status.json +++ b/api/wevia-autonomy-status.json @@ -1,8 +1,8 @@ { - "timestamp": "2026-04-16 00:20:01", + "timestamp": "2026-04-16 00:25:01", "version": "1.0", "disk": 76, - "ram": 12, + "ram": 10, "docker": 8, "ssl_days": 354, "ollama_models": 0, @@ -14,94 +14,94 @@ "title": "Restart php-fpm", "cmd": "systemctl restart php8.5-fpm", "output": "", - "time": "00:20:01" + "time": "00:25:01" }, { "title": "S95 restart pmta", - "time": "00:20:01" + "time": "00:25:01" }, { "title": "S95 restart kumomta", - "time": "00:20:01" + "time": "00:25:01" }, { "title": "S95 restart postfix", - "time": "00:20:01" + "time": "00:25:01" }, { "title": "S95 restart sentinel", - "time": "00:20:01" + "time": "00:25:01" }, { "title": "S95 restart adx", - "time": "00:20:01" + "time": "00:25:01" } ], "alerts": [ { "level": "critical", "msg": "S204:php-fpm DOWN (:9000)", - "time": "00:20:01" + "time": "00:25:01" }, { "level": "critical", "msg": "S204:deerflow DOWN (:2024)", - "time": "00:20:01" + "time": "00:25:01" }, { "level": "critical", "msg": "S204:authentik DOWN (:9090)", - "time": "00:20:01" + "time": "00:25:01" }, { "level": "critical", "msg": "S95:pmta DOWN (:25)", - "time": "00:20:01" + "time": "00:25:01" }, { "level": "critical", "msg": "S95:kumomta DOWN (:587)", - "time": "00:20:01" + "time": "00:25:01" }, { "level": "critical", "msg": "S95:postfix DOWN (:2525)", - "time": "00:20:01" + "time": "00:25:01" }, { "level": "critical", "msg": "S95:sentinel DOWN (:5890)", - "time": "00:20:01" + "time": "00:25:01" }, { "level": "critical", "msg": "S95:adx DOWN (:5821)", - "time": "00:20:01" + "time": "00:25:01" }, { "level": "warning", "msg": "Token : expired", - "time": "00:20:03" + "time": "00:25:02" }, { "level": "warning", "msg": "Token : expired", - "time": "00:20:03" + "time": "00:25:02" }, { "level": "warning", "msg": "Architecture score 55\/100", - "time": "00:20:03" + "time": "00:25:02" } ], "log": [ - "00:20:01 AUTO-FIX: Restart php-fpm", - "00:20:01 Disk: 76%", - "00:20:01 SSL: 354d remaining", - "00:20:02 Docker: 8 containers", - "00:20:02 Ollama: 0 models, 0GB", - "00:20:02 RAM: 12%", - "00:20:03 Arch score: 55\/100" + "00:25:01 AUTO-FIX: Restart php-fpm", + "00:25:01 Disk: 76%", + "00:25:01 SSL: 354d remaining", + "00:25:01 Docker: 8 containers", + "00:25:01 Ollama: 0 models, 0GB", + "00:25:01 RAM: 10%", + "00:25:02 Arch score: 55\/100" ], "s204_services": 8, "s95_mta": 5 diff --git a/api/wevia-blade-status.json b/api/wevia-blade-status.json index cf4a9a6e3..ed1039288 100644 --- a/api/wevia-blade-status.json +++ b/api/wevia-blade-status.json @@ -1 +1 @@ -{"ts":"02:22","status":"offline"} +{"ts":"02:28","status":"offline"} diff --git a/api/wevia-capabilities-ext.php b/api/wevia-capabilities-ext.php index 98d80291e..15430a9f2 100644 --- a/api/wevia-capabilities-ext.php +++ b/api/wevia-capabilities-ext.php @@ -37,7 +37,7 @@ case 'list': case 'openclaw': $p=$_POST['prompt']??$q; if(!$p)die(json_encode(['error'=>'no prompt'])); - $r=cap_api('http://localhost:11435/api/generate','POST',['model'=>'qwen3:4b','prompt'=>$p,'stream'=>false,'options'=>['temperature'=>0.7,'num_predict'=>300]],20); + $r=cap_api('http://localhost:11434/api/generate','POST',['model'=>'qwen3:4b','prompt'=>$p,'stream'=>false,'options'=>['temperature'=>0.7,'num_predict'=>300]],20); echo json_encode(['response'=>$r['data']['response']??'','server'=>'S151']); break; case 'wevads': diff --git a/api/wevia-capabilities.php b/api/wevia-capabilities.php index 8bcf26069..9c286aeaa 100644 --- a/api/wevia-capabilities.php +++ b/api/wevia-capabilities.php @@ -55,7 +55,7 @@ switch ($cap) { 'loki' => api('http://localhost:3110/ready', 'GET', null, 3), 'mattermost'=> api('http://localhost:8065/api/v4/system/ping', 'GET', null, 3), 'vaultwarden'=> api('http://localhost:8222/alive', 'GET', null, 3), - 'ollama_local'=> api('http://localhost:11435/api/tags', 'GET', null, 3), + 'ollama_local'=> api('http://localhost:11434/api/tags', 'GET', null, 3), ]; $up = 0; foreach ($services as $k => &$s) { @@ -188,7 +188,7 @@ asyncio.run(s()) $model = $_POST['model'] ?? 'qwen3:4b'; $prompt = $_POST['prompt'] ?? $q; if (!$prompt) die(json_encode(['error'=>'no prompt'])); - $r = api('http://localhost:11435/api/generate', 'POST', [ + $r = api('http://localhost:11434/api/generate', 'POST', [ 'model'=>$model, 'prompt'=>$prompt, 'stream'=>false, 'options'=>['temperature'=>0.7, 'num_predict'=>500] ], 30); diff --git a/api/wevia-daily-standup.php b/api/wevia-daily-standup.php index 1d8fca5db..d18d1b333 100644 --- a/api/wevia-daily-standup.php +++ b/api/wevia-daily-standup.php @@ -38,7 +38,7 @@ function llm_call($prompt) { } } // Fallback Ollama - $ch = curl_init("http://127.0.0.1:11435/v1/chat/completions"); + $ch = curl_init("http://127.0.0.1:11434/v1/chat/completions"); curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => ["Content-Type: application/json"], CURLOPT_POSTFIELDS => json_encode(["model" => "weval-brain-v3", diff --git a/api/wevia-dashboard.php b/api/wevia-dashboard.php index 1d0556ab9..e39054007 100644 --- a/api/wevia-dashboard.php +++ b/api/wevia-dashboard.php @@ -17,7 +17,7 @@ $ssl_exp = trim(shell_exec("openssl x509 -in /var/www/weval/ssl/fullchain.pem -n $ssl_days = $ssl_exp ? (int)((strtotime($ssl_exp) - time()) / 86400) : -1; // Ollama -$ollama = @json_decode(@file_get_contents('http://127.0.0.1:11435/api/tags'), true); +$ollama = @json_decode(@file_get_contents('http://127.0.0.1:11434/api/tags'), true); $models = count($ollama['models'] ?? []); $ollama_gb = round(array_sum(array_map(fn($m) => $m['size'] / (1024**3), $ollama['models'] ?? [])), 1); diff --git a/api/wevia-deep-test.php b/api/wevia-deep-test.php index 4903c8d73..0ca061c83 100644 --- a/api/wevia-deep-test.php +++ b/api/wevia-deep-test.php @@ -36,7 +36,7 @@ $t[]=tg("https://weval-consulting.com/api/blade-agent.php?k=BLADE2026&action=sta // INFRA $t[]=tg("http://127.0.0.1:5001/health",'Infra:MiroFish'); -$t[]=tg("http://127.0.0.1:11435/api/tags",'Infra:Ollama'); +$t[]=tg("http://127.0.0.1:11434/api/tags",'Infra:Ollama'); $t[]=tg("http://10.1.0.3:5890/api/sentinel-brain.php?action=health",'Infra:S95'); // AGENTS-ARCHI dependencies diff --git a/api/wevia-dev-pipeline.php b/api/wevia-dev-pipeline.php index e2723d03f..44f14652f 100644 --- a/api/wevia-dev-pipeline.php +++ b/api/wevia-dev-pipeline.php @@ -129,7 +129,7 @@ switch ($action) { $scan['qdrant'] = $total_v; // Ollama - $ollama = json_decode(@file_get_contents('http://127.0.0.1:11435/api/tags') ?: '{}', true); + $ollama = json_decode(@file_get_contents('http://127.0.0.1:11434/api/tags') ?: '{}', true); $scan['ollama_models'] = count($ollama['models'] ?? []); echo json_encode($scan, JSON_PRETTY_PRINT); diff --git a/api/wevia-dispatcher.php b/api/wevia-dispatcher.php index fff006172..0019bbc35 100644 --- a/api/wevia-dispatcher.php +++ b/api/wevia-dispatcher.php @@ -446,7 +446,7 @@ $ROUTES = [ 'sys_ram' => function($p) { return execLocal('free -h'); }, 'sys_disk' => function($p) { return execLocal('df -h /'); }, 'sys_docker' => function($p) { return execLocal('docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" 2>/dev/null | head -30'); }, - 'sys_ollama' => function($p) { return json_decode(@file_get_contents('http://127.0.0.1:11435/api/tags'), true); }, + 'sys_ollama' => function($p) { return json_decode(@file_get_contents('http://127.0.0.1:11434/api/tags'), true); }, 'sys_qdrant' => function($p) { return json_decode(@file_get_contents('http://127.0.0.1:6333/collections'), true); }, 'sys_crons' => function($p) { return execLocal('crontab -l 2>/dev/null | grep -v "^#" | grep "."'); }, diff --git a/api/wevia-fast-path-v3.php b/api/wevia-fast-path-v3.php index d006d94fa..8f45db0ad 100644 --- a/api/wevia-fast-path-v3.php +++ b/api/wevia-fast-path-v3.php @@ -4,13 +4,7 @@ function wevia_fast_path($msg) { $r = null; // PRIORITY BYPASS — exception commit/push+dirty if ((strpos($m,'commit')!==false||strpos($m,'push')!==false) && preg_match('/dirty|fichier/i',$m)) { /* commit intent handles */ } - elseif (preg_match('/reconcil|bilan|dirty|l99|saas|tout.*verif|ethica.*pays|ethica.*valid|ethica.*enrich|ethica.*campag|audit|securite.*port|risque|cyber|scan.*complet/i', $m)) if(preg_match('/scan.*brain.*module|modules.*dormant|brain.*dormant/i',$msg)) { $php=count(glob('/opt/wevia-brain/*.php'));$md=count(glob('/opt/wevia-brain/cognitive/*.md'))+count(glob('/opt/wevia-brain/knowledge/deep/*.md'));$nuc=count(glob('/opt/wevia-brain/prompts/nucleus/*.md'));$per=count(glob('/opt/wevia-brain/prompts/personas/*.md'));$total=$php+$md+$nuc+$per;return['response'=>"BRAIN MODULES: {$php} PHP + {$md} MD knowledge + {$nuc} nucleus + {$per} personas = {$total} total. Wirés: ~35. GAP: ".($total-35)." dormants.",'engine'=>'BrainScan','intent'=>'brain_scan','short_circuit'=>true]; } - if(preg_match('/invoke.*kilo|kilo.*ask|kilo.*run/i',$msg)) { $out=[];exec('kilo ask "'.addslashes($msg).'" 2>&1 | head -20',$out);return['response'=>implode("\n",$out)?:'Kilo: aucune réponse','engine'=>'Kilo/CLI','intent'=>'kilo_invoke','short_circuit'=>true]; } - if(preg_match('/invoke.*hermes|hermes.*skill/i',$msg)) { $sk=implode(', ',array_map(fn($f)=>basename($f,'.md'),glob('/var/www/weval/skills/hermes/*.md')?:glob('/opt/hermes/skills/*.md')?:[]));return['response'=>'Hermes Skills: '.($sk?:$sk?:'aucun skill trouvé'),'engine'=>'Hermes','intent'=>'hermes_invoke','short_circuit'=>true]; } - if(preg_match('/invoke.*paperclip|paperclip.*run|paperclip.*agent/i',$msg)) { return['response'=>'Paperclip: 890 agents, 902 skills actifs. Agents: CEO(b4eb33d3), CTO(1fd4992b), DevOps(0f7ca82a), QA(946ea360), Research(2678388d), Marketing(6a06dd25), Finance(8dad1add), Data(39fa94a9), Eng-WEVADS(dedf16b7), Eng-Ethica(82c7d6e0). Invoke: paperclip run ','engine'=>'Paperclip/Bridge','intent'=>'paperclip_invoke','short_circuit'=>true]; } - if(preg_match('/invoke.*deerflow|deerflow.*research|deerflow.*skill/i',$msg)) { $dr=@file_get_contents('http://127.0.0.1:8902/api/research',false,stream_context_create(['http'=>['method'=>'POST','header'=>'Content-Type: application/json','content'=>json_encode(['query'=>$msg]),'timeout'=>20]]));return['response'=>$dr?:'DeerFlow: service non disponible sur port 8902','engine'=>'DeerFlow','intent'=>'deerflow_invoke','short_circuit'=>true]; } - if(preg_match('/master.*add.*intent|auto.*wire.*intent/i',$msg)) { return['response'=>'AUTO-WIRE: Utilisez le format: master add intent :: :: . Note: auto-wire en maintenance, contactez Opus pour wiring.','engine'=>'AutoWire','intent'=>'auto_wire_info','short_circuit'=>true]; } -return null; + elseif (preg_match('/reconcil|bilan|dirty|l99|saas|tout.*verif|ethica.*pays|ethica.*valid|ethica.*enrich|ethica.*campag|audit|securite.*port|risque|cyber|scan.*complet/i', $m)) // OPUS-FIX RC#1: Long complex messages skip FastPath -> go to LLM if (mb_strlen($m) > 80 && preg_match('/\b(pourquoi|comment|explique|corrige|repare|fixe|analyse|compare|ameliore|propose|aide.*:|wire|autowire|self.fix)\b/iu', $m)) return null; if ($m === 'ping' || strpos($m, 'ping') === 0) { @@ -159,27 +153,27 @@ OPT: ".$r2; $r = "WEVIA Master IA souveraine WEVAL. 375 tools, 12 providers, 131K HCPs. Tapez: reconcile dirty l99 ports providers git ethica crons docker nonreg ping aide"; } - // === BRIDGE INTENTS (Opus GODMODE 16avr) === - if(preg_match("/scan.*brain.*module|modules.*dormant|brain.*dormant/i",$m)) { + // === BRIDGE INTENTS (Opus GODMODE 16avr clean) === + if ($r === null && preg_match("/scan.*brain.*module|modules.*dormant|brain.*dormant/i", $m)) { $php=count(glob("/opt/wevia-brain/*.php")); $md=count(glob("/opt/wevia-brain/cognitive/*.md"))+count(glob("/opt/wevia-brain/knowledge/deep/*.md")); $nuc=count(glob("/opt/wevia-brain/prompts/nucleus/*.md")); $per=count(glob("/opt/wevia-brain/prompts/personas/*.md")); $tot=$php+$md+$nuc+$per; - $r="BRAIN MODULES: {$php} PHP + {$md} MD knowledge + {$nuc} nucleus + {$per} personas = {$tot} total. Wires actifs: ~35. GAP: ".($tot-35)." dormants."; + $r = "BRAIN: {$php}PHP + {$md}MD + {$nuc}nucleus + {$per}personas = {$tot} total. Actifs:~35. GAP:".($tot-35)." dormants."; } - if(preg_match("/invoke.*kilo|kilo.*ask|kilo.*run/i",$m)) { - $out=[]; exec("kilo ask \"".addslashes($msg)."\" 2>&1 | head -20",$out); $r=implode("\n",$out)?:"Kilo: aucune reponse"; + if ($r === null && preg_match("/invoke.*kilo|kilo.*ask|kilo.*run/i", $m)) { + $out=[]; exec("kilo ask \"".addslashes($msg)."\" 2>&1 | head -20", $out); $r = implode("\n",$out) ?: "Kilo: pas de reponse"; } - if(preg_match("/invoke.*hermes|hermes.*skill/i",$m)) { - $sk=glob("/opt/hermes/skills/*.md")?:glob("/var/www/weval/skills/hermes/*.md")?:[]; - $r="Hermes: ".count($sk)." skills. ".implode(", ",array_map(fn($f)=>basename($f,".md"),$sk)); + if ($r === null && preg_match("/invoke.*hermes|hermes.*skill/i", $m)) { + $sk = glob("/var/www/weval/skills/hermes/*/") ?: []; + $r = "Hermes: ".count($sk)." skills. ".implode(", ", array_map(fn($f)=>basename(rtrim($f,"/")), $sk)); } - if(preg_match("/invoke.*paperclip|paperclip.*run|paperclip.*agent/i",$m)) { - $r="Paperclip: 890 agents, 902 skills. Agents: CEO, CTO, DevOps, QA, Research, Marketing, Finance, Data, Eng-WEVADS, Eng-Ethica. API: /api/paperclip-proxy.php"; + if ($r === null && preg_match("/invoke.*paperclip|paperclip.*run|paperclip.*agent/i", $m)) { + $r = "Paperclip: 890 agents, 902 skills. Agents: CEO,CTO,DevOps,QA,Research,Marketing,Finance,Data,WEVADS,Ethica."; } - if(preg_match("/invoke.*deerflow|deerflow.*research/i",$m)) { - $dr=@file_get_contents("http://127.0.0.1:8902/api/research",false,stream_context_create(["http"=>["method"=>"POST","header"=>"Content-Type: application/json","content"=>json_encode(["query"=>$msg]),"timeout"=>20]])); - $r=$dr?:"DeerFlow: service port 8902 non disponible"; + if ($r === null && preg_match("/invoke.*deerflow|deerflow.*research/i", $m)) { + $dr = @file_get_contents("http://127.0.0.1:8902/api/research",false,stream_context_create(["http"=>["method"=>"POST","header"=>"Content-Type: application/json","content"=>json_encode(["query"=>$msg]),"timeout"=>20]])); + $r = $dr ?: "DeerFlow: port 8902 down"; } - if(preg_match("/master.*add.*intent|auto.*wire/i",$m)) { - $r="AUTO-WIRE: Format: master add intent :: :: . Auto-wire en cours de reparation."; + if ($r === null && preg_match("/master.*add.*intent|auto.*wire/i", $m)) { + $r = "AUTO-WIRE: format: master add intent :: :: . En maintenance."; } // LLM FALLBACK: si aucun intent technique matché et message > 30 chars → sovereign direct diff --git a/api/wevia-health.php b/api/wevia-health.php index bdf88ad33..4208b3e10 100644 --- a/api/wevia-health.php +++ b/api/wevia-health.php @@ -5,7 +5,7 @@ $status = "ok"; $checks = []; // Ollama -$r = @file_get_contents("http://127.0.0.1:11435/api/tags"); +$r = @file_get_contents("http://127.0.0.1:11434/api/tags"); $models = $r ? count(json_decode($r,true)["models"] ?? []) : 0; $checks["ollama"] = $models > 0; if (!$checks["ollama"]) { $status = "degraded"; shell_exec("systemctl restart ollama 2>/dev/null"); } diff --git a/api/wevia-live-metrics.php b/api/wevia-live-metrics.php index 79d5f343f..e51b5002f 100644 --- a/api/wevia-live-metrics.php +++ b/api/wevia-live-metrics.php @@ -19,7 +19,7 @@ $metrics = [ 'products' => intval(trim(shell_exec("ls /var/www/html/products/*.html 2>/dev/null | wc -l"))), 'html' => intval(trim(shell_exec("ls /var/www/html/*.html 2>/dev/null | wc -l"))), 'commits' => intval(trim(shell_exec("cd /var/www/html && git rev-list --count HEAD 2>/dev/null"))), - 'ollama' => intval(trim(shell_exec("curl -s http://127.0.0.1:11435/api/tags 2>/dev/null | python3 -c \"import sys,json;print(len(json.load(sys.stdin).get('models',[])))\" 2>/dev/null"))), + 'ollama' => intval(trim(shell_exec("curl -s http://127.0.0.1:11434/api/tags 2>/dev/null | python3 -c \"import sys,json;print(len(json.load(sys.stdin).get('models',[])))\" 2>/dev/null"))), 'disk_pct' => intval(trim(shell_exec("df / | tail -1 | awk '{print \$5}' | tr -d '%'"))), 'nonreg_pass' => 153, 'nonreg_total' => 153, diff --git a/api/wevia-master-api.php b/api/wevia-master-api.php index 594ecf566..05bf3acb6 100644 --- a/api/wevia-master-api.php +++ b/api/wevia-master-api.php @@ -174,7 +174,7 @@ pre{background:#12121a;border:1px solid #2a2a3d;border-radius:8px;padding:1rem;o
UP':'DOWN'?>
-
Ollama (port 11435)
+
Ollama (port 11434)
Modèles locaux
Tier 1 (free fast)
@@ -216,7 +216,7 @@ curl "/api/wevia-master-api.php?health"

🏗️ Architecture

-TIER 0 (Souverain, 0€)     → Ollama:11435 [weval-brain-v2, qwen2.5:7b, qwen3:4b, mistral, medllama2]
+TIER 0 (Souverain, 0€)     → Ollama:11434 [weval-brain-v2, qwen2.5:7b, qwen3:4b, mistral, medllama2]
 TIER 1 (Free ultra-fast)    → Cerebras, Groq, SambaNova
 TIER 2 (Free quality)       → Mistral Cloud, Cohere, Gemini
 TIER 3 (Frontier, payant)   → Claude API, GPT API (non implémenté — dernier recours)
diff --git a/api/wevia-master-autoheal.php b/api/wevia-master-autoheal.php
index 116ebda36..d1a8913b7 100644
--- a/api/wevia-master-autoheal.php
+++ b/api/wevia-master-autoheal.php
@@ -15,7 +15,7 @@ function th($url,$name){
 $t=[
     th('http://127.0.0.1:4000','WEVAL API'),
     th('http://127.0.0.1:3000','MiroFish'),
-    th('http://127.0.0.1:11435/api/tags','Ollama'),
+    th('http://127.0.0.1:11434/api/tags','Ollama'),
     th('https://weval-consulting.com/wevads-ia/','WEVADS IA'),
     th('https://weval-consulting.com/agents-archi.html','Agents Archi'),
     th('https://weval-consulting.com/wevia-console.html','WEVIA Console'),
diff --git a/api/wevia-master-autonomous.php b/api/wevia-master-autonomous.php
index 7b2bb100e..7d0a5a345 100644
--- a/api/wevia-master-autonomous.php
+++ b/api/wevia-master-autonomous.php
@@ -13,7 +13,7 @@ $checks=[
     ['name'=>'Blog','url'=>'https://weval-consulting.com/api/actualites/index.php','expect'=>200],
     ['name'=>'OSS','url'=>'https://weval-consulting.com/api/oss-cache.json','expect'=>200],
     ['name'=>'Brain','url'=>'https://weval-consulting.com/api/wevia-master-brain.json','expect'=>200],
-    ['name'=>'Ollama','url'=>'http://127.0.0.1:11435/api/version','expect'=>200],
+    ['name'=>'Ollama','url'=>'http://127.0.0.1:11434/api/version','expect'=>200],
     ['name'=>'Qdrant','url'=>'http://127.0.0.1:6333/collections','expect'=>200],
     ['name'=>'DeerFlow','url'=>'http://127.0.0.1:2024/ok','expect'=>200],
     ['name'=>'MiroFish','url'=>'http://127.0.0.1:5001/health','expect'=>200],
diff --git a/api/wevia-master-registry.php b/api/wevia-master-registry.php
index e31ebd0e7..abd03a432 100644
--- a/api/wevia-master-registry.php
+++ b/api/wevia-master-registry.php
@@ -26,7 +26,7 @@ $s204=[
     [8080,'SearXNG','search'],[8123,'ClickHouse','db'],
     [8222,'Vaultwarden','security'],[8443,'S95 Backup','infra'],
     [8888,'SearXNG Proxy','search'],[9090,'Prometheus','monitor'],
-    [9100,'Node Exporter','monitor'],[11435,'Ollama','ai'],
+    [9100,'Node Exporter','monitor'],[11434,'Ollama','ai'],
     [49222,'SSH','infra'],
 ];
 foreach($s204 as $s){$apps[]=check('127.0.0.1',$s[0],$s[1],'S204');}
diff --git a/api/wevia-memory-api.php b/api/wevia-memory-api.php
index ab5f84e34..9852534ef 100644
--- a/api/wevia-memory-api.php
+++ b/api/wevia-memory-api.php
@@ -14,7 +14,7 @@ if ($_SERVER["REQUEST_METHOD"] === "OPTIONS") { http_response_code(200); exit; }
 
 $QDRANT = "http://127.0.0.1:6333";
 $COLLECTION = "wevia_memory";
-$OLLAMA = "http://127.0.0.1:11435";
+$OLLAMA = "http://127.0.0.1:11434";
 
 $input = json_decode(file_get_contents("php://input"), true) ?: [];
 $action = $_GET["action"] ?? $input["action"] ?? "stats";
diff --git a/api/wevia-multi-ai.php b/api/wevia-multi-ai.php
index f230abc49..b817835e4 100644
--- a/api/wevia-multi-ai.php
+++ b/api/wevia-multi-ai.php
@@ -53,7 +53,7 @@ $system = $system_prompts[$mode] ?? $system_prompts['auto'];
 
 // Try providers in order
 $providers = [
-    ['name' => 'Ollama', 'url' => 'http://127.0.0.1:11435/v1/chat/completions', 'key' => 'ollama', 'model' => $selected_model],
+    ['name' => 'Ollama', 'url' => 'http://127.0.0.1:11434/v1/chat/completions', 'key' => 'ollama', 'model' => $selected_model],
 ];
 
 // Add external providers if keys exist
diff --git a/api/wevia-multi-provider.php b/api/wevia-multi-provider.php
index 68613795d..76408ed45 100644
--- a/api/wevia-multi-provider.php
+++ b/api/wevia-multi-provider.php
@@ -224,7 +224,7 @@ if ($mdl === "mistral" && $mis) {
 
 // Ollama local
 if ($mdl === "ollama") {
-    list($code, $r) = cc("http://127.0.0.1:11435/api/chat",
+    list($code, $r) = cc("http://127.0.0.1:11434/api/chat",
         ["Content-Type: application/json"],
         ["model" => "qwen3:4b", "messages" => $ms, "stream" => false], 30);
     if ($code === 200) {
@@ -292,7 +292,7 @@ if ($mdl === "weval-brain-v3") {
 }
 
 if ($mdl === "ollama-gemma4") {
-    list($code, $r) = cc("http://127.0.0.1:11435/api/chat",
+    list($code, $r) = cc("http://127.0.0.1:11434/api/chat",
         ["Content-Type: application/json"],
         ["model" => "gemma4:e4b", "messages" => $ms, "stream" => false], 30);
     if ($code === 200) {
diff --git a/api/wevia-oss-scan.php b/api/wevia-oss-scan.php
index d19ce8aed..f0cda5b9f 100644
--- a/api/wevia-oss-scan.php
+++ b/api/wevia-oss-scan.php
@@ -4,7 +4,7 @@ $secrets=[];
 foreach(file("/etc/weval/secrets.env",2|4) as $l){if(strpos($l,"=")!==false){list($k,$v)=explode("=",$l,2);$secrets[trim($k)]=trim($v," \t\"'");}}
 // Scan installed tools
 $tools = [];
-$checks = ["playwright"=>"playwright --version","scrapy"=>"scrapy version","nuclei"=>"nuclei -version","docker"=>"docker --version","python3"=>"python3 --version","php"=>"php -v | head -1","node"=>"node -v","git"=>"git --version","curl"=>"curl --version | head -1","psql"=>"psql --version","nginx"=>"nginx -v 2>&1","ollama"=>"curl -sf http://127.0.0.1:11435/api/tags | python3 -c \"import json,sys;print(len(json.load(sys.stdin)['models']),'models')\""];
+$checks = ["playwright"=>"playwright --version","scrapy"=>"scrapy version","nuclei"=>"nuclei -version","docker"=>"docker --version","python3"=>"python3 --version","php"=>"php -v | head -1","node"=>"node -v","git"=>"git --version","curl"=>"curl --version | head -1","psql"=>"psql --version","nginx"=>"nginx -v 2>&1","ollama"=>"curl -sf http://127.0.0.1:11434/api/tags | python3 -c \"import json,sys;print(len(json.load(sys.stdin)['models']),'models')\""];
 foreach ($checks as $name => $cmd) {
     $out = trim(shell_exec("$cmd 2>/dev/null") ?? "");
     $tools[$name] = $out ? ["status"=>"installed","version"=>substr($out,0,50)] : ["status"=>"missing"];
diff --git a/api/wevia-security-fortress.php b/api/wevia-security-fortress.php
index 18f4a0939..bacdf0bd0 100644
--- a/api/wevia-security-fortress.php
+++ b/api/wevia-security-fortress.php
@@ -6,7 +6,7 @@ $results = ['timestamp' => date('Y-m-d H:i:s'), 'agent' => 'security-fortress',
 // === S204 PORTS ===
 $s204_ports = [
     ['port'=>80,'name'=>'nginx HTTP'],['port'=>443,'name'=>'nginx HTTPS'],
-    ['port'=>11435,'name'=>'Ollama'],['port'=>6333,'name'=>'Qdrant'],
+    ['port'=>11434,'name'=>'Ollama'],['port'=>6333,'name'=>'Qdrant'],
     ['port'=>8888,'name'=>'SearXNG'],['port'=>9100,'name'=>'Authentik'],
     ['port'=>3900,'name'=>'ClawCode'],['port'=>4000,'name'=>'Workhorse'],
     ['port'=>4001,'name'=>'LiteLLM'],['port'=>3001,'name'=>'Uptime Kuma'],
diff --git a/api/wevia-selfmanage.json b/api/wevia-selfmanage.json
index e62db1f9e..58e99f080 100644
--- a/api/wevia-selfmanage.json
+++ b/api/wevia-selfmanage.json
@@ -1 +1 @@
-{"ts": "02:20", "status": "ok"}
\ No newline at end of file
+{"ts": "02:25", "status": "ok"}
\ No newline at end of file
diff --git a/api/wevia-vault-search.php b/api/wevia-vault-search.php
index 38cd8071e..31a1d6d6e 100644
--- a/api/wevia-vault-search.php
+++ b/api/wevia-vault-search.php
@@ -8,7 +8,7 @@ $q = $_GET['q'] ?? $_POST['q'] ?? '';
 if (!$q) { echo json_encode(['error' => 'no query']); exit; }
 
 // Get embedding from Ollama
-$ch = curl_init('http://127.0.0.1:11435/api/embed');
+$ch = curl_init('http://127.0.0.1:11434/api/embed');
 curl_setopt_array($ch, [
     CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 8,
     CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
diff --git a/api/wevia-wave114.php b/api/wevia-wave114.php
index 4202d1651..f97a0a989 100644
--- a/api/wevia-wave114.php
+++ b/api/wevia-wave114.php
@@ -1022,7 +1022,7 @@ if (preg_match('/^gpu$|^gpu.?info|gpu.?status/i', $q)) {
     $nv = wv_sh("nvidia-smi 2>&1 | head -15");
     if (strpos($nv, "command not found") !== false || strpos($nv, "NVIDIA") === false) {
         $r .= "No NVIDIA GPU on S204 (CPU-only server)\n";
-        $r .= "=== Local Ollama models ===\n".wv_sh("curl -s --max-time 3 http://localhost:11435/api/tags 2>/dev/null | head -c 500");
+        $r .= "=== Local Ollama models ===\n".wv_sh("curl -s --max-time 3 http://localhost:11434/api/tags 2>/dev/null | head -c 500");
     } else {
         $r .= $nv;
     }
@@ -1135,7 +1135,7 @@ if (preg_match('/restart.?phpfpm|phpfpm.?restart|reload.?phpfpm/i', $q)) {
 
 // ===== RESTART OLLAMA =====
 if (preg_match('/restart.?ollama|ollama.?restart|reload.?ollama/i', $q)) {
-    $out = wv_sh("sudo systemctl restart ollama 2>&1 | head -c 500 && sleep 2 && curl -s --max-time 3 http://localhost:11435/api/tags | head -c 200");
+    $out = wv_sh("sudo systemctl restart ollama 2>&1 | head -c 500 && sleep 2 && curl -s --max-time 3 http://localhost:11434/api/tags | head -c 200");
     wv_out("RESTART OLLAMA\n$out");
 }
 
@@ -1371,7 +1371,7 @@ if (preg_match('/reconcili|audit.?complet|scan.?complet|check.?all|verif.?tout|b
     $dock = (int)wv_sh("docker ps -q | wc -l");
     $dock_list = wv_sh("docker ps --format '{{.Names}} {{.Status}}' 2>/dev/null");
     $ports_dup = trim(wv_sh("ss -tlnp 2>/dev/null | grep LISTEN | awk '{print \$4}' | sed 's/.*://' | sort | uniq -d"));
-    $ollama = trim(wv_sh("curl -s --max-time 3 http://localhost:11435/api/tags 2>/dev/null | python3 -c \"import json,sys;d=json.load(sys.stdin);print(len(d.get('models',[])))\" 2>/dev/null"));
+    $ollama = trim(wv_sh("curl -s --max-time 3 http://localhost:11434/api/tags 2>/dev/null | python3 -c \"import json,sys;d=json.load(sys.stdin);print(len(d.get('models',[])))\" 2>/dev/null"));
     $qdrant = trim(wv_sh("curl -s --max-time 3 http://localhost:6333/collections 2>/dev/null | python3 -c \"import json,sys;d=json.load(sys.stdin);print(len(d.get('result',{}).get('collections',[])))\" 2>/dev/null"));
     $nr_f = @json_decode(@file_get_contents('/var/www/html/api/nonreg-latest.json'), true) ?: [];
     $nr = ($nr_f['pass'] ?? '?').'/'.($nr_f['total'] ?? '?');
@@ -1535,7 +1535,7 @@ if (preg_match('/chatbot.*(marche|fonctionne|status|live|up)|public.*chatbot|wev
 // ===== COMBIEN DE PROVIDERS =====
 if (preg_match('/combien.*(provider|ia|model)|provider.*(count|combien|nombre)|nos.*provider/i', $q)) {
     $cnt = (int)trim(wv_sh("grep -c _KEY= /etc/weval/secrets.env 2>/dev/null"));
-    $ollama = (int)trim(wv_sh("curl -s --max-time 3 http://localhost:11435/api/tags 2>/dev/null | grep -c name"));
+    $ollama = (int)trim(wv_sh("curl -s --max-time 3 http://localhost:11434/api/tags 2>/dev/null | grep -c name"));
     wv_out("PROVIDERS IA: $cnt cles API + $ollama modeles Ollama local
 Cascade: Groq > HF > NVIDIA > Ollama > Cerebras > SambaNova > Mistral
 Cout: 0 euros");
@@ -1680,7 +1680,7 @@ if (preg_match('/dernier.*(commit|push|git)|git.*(log|history|dernier)|show.*com
 if (preg_match('/disponibilit|uptime|sla|service.*(up|down|status)|tout.*marche/i', $q)) {
     $r = "DISPONIBILITE SERVICES\n=====================\n";
     $checks = [
-        ["Ollama", "curl -s --max-time 2 http://localhost:11435/api/tags -o /dev/null -w '%{http_code}'"],
+        ["Ollama", "curl -s --max-time 2 http://localhost:11434/api/tags -o /dev/null -w '%{http_code}'"],
         ["Qdrant", "curl -s --max-time 2 http://localhost:6333/collections -o /dev/null -w '%{http_code}'"],
         ["SearXNG", "curl -s --max-time 2 http://localhost:8888/ -o /dev/null -w '%{http_code}'"],
         ["DeepSeek Web", "curl -s --max-time 2 http://localhost:8901/api/health -o /dev/null -w '%{http_code}'"],
@@ -1779,7 +1779,7 @@ if (preg_match('/provider.*(cascade|status|health|all)|cascade.*(test|status)|al
         $has = preg_match("/" . $t[0] . "=.{5,}/", $env) ? "KEY" : "NO";
         $r .= "  " . ($has==="KEY"?"OK":"--") . " " . $t[2] . " (" . $t[0] . ")\n";
     }
-    $ollama = trim(wv_sh("curl -s --max-time 2 http://localhost:11435/api/tags 2>/dev/null | grep -c name"));
+    $ollama = trim(wv_sh("curl -s --max-time 2 http://localhost:11434/api/tags 2>/dev/null | grep -c name"));
     $r .= "  OK Ollama ($ollama models local)\n";
     $r .= "  OK DeepSeek Web (port 8901)\n";
     wv_out($r);
@@ -2828,8 +2828,8 @@ if (preg_match('/subdomain.*(check|status|etat|list)|check.*subdomain|etat.*sous
 
 // --- OLLAMA MODELS ---
 if (preg_match('/ollama.*(model|list|pull|status)|model.*ollama|nos.*model/i', $q)) {
-    $models = wv_sh("curl -s --max-time 5 http://localhost:11435/api/tags 2>/dev/null | python3 -c \"import json,sys;[print(m['name'],round(m.get('size',0)/1e9,1),'GB') for m in json.load(sys.stdin).get('models',[])]\" 2>/dev/null");
-    $cnt = (int)wv_sh("curl -s --max-time 3 http://localhost:11435/api/tags 2>/dev/null | grep -c name");
+    $models = wv_sh("curl -s --max-time 5 http://localhost:11434/api/tags 2>/dev/null | python3 -c \"import json,sys;[print(m['name'],round(m.get('size',0)/1e9,1),'GB') for m in json.load(sys.stdin).get('models',[])]\" 2>/dev/null");
+    $cnt = (int)wv_sh("curl -s --max-time 3 http://localhost:11434/api/tags 2>/dev/null | grep -c name");
     wv_out("OLLAMA MODELS ($cnt)\n$models");
 }