Commit Graph
125 Commits
Author SHA1 Message Date
Folzo e93ab95350 jean-router: detection a 3 niveaux - PC / Jean / Ollama
- PC: TCP connect (ON/OFF) → WoL uniquement si OFF
- Jean: HTTP /api/presets (UP/DOWN)
- Ollama: HTTP /api/version (UP/DOWN)
- Dashboard: 3 lignes de statut distinctes
- WoL ne se declenche que si PC OFF, pas si service DOWN
2026-08-02 01:19:35 +02:00
Folzo dc900172f2 jean-router: detection PC via TCP connect au lieu de HTTP
- TCP connect vers 8090 ou 11434 (pas de requete HTTP)
- ConnectionRefused = PC allume (service down)
- Timeout = PC eteint → WoL
- Plus de spam HTTP vers un serveur bloque
2026-08-02 01:15:46 +02:00
Folzo 697e4e36c9 jean-router: WoL ne se declenche plus si Ollama repond (PC allume)
- jean_alive verifie Jean(8090) OU Ollama(11434)
- WoL seulement si les DEUX sont inaccessibles
- Logs WoL espaces a 5s au lieu de 2s
2026-08-02 01:13:21 +02:00
Folzo bb15bd8d24 dashboard: supprimer le spam de logs DEBUG et reduire le polling
- urllib3/requests en WARNING (plus de 'Starting new HTTP connection')
- QueueHandler en INFO (plus de DEBUG)
- Polling status reduit de 3s a 10s
2026-08-02 01:11:49 +02:00
Folzo 62bb38ecff jean-router: dashboard HTML de diagnostic temps reel
- /dashboard : page HTML avec statut, slot, stats, actions
- /api/dashboard/status : JSON etat complet (Jean, Ollama, slot, VRAM)
- /api/dashboard/logs/stream : SSE logs en temps reel
- /api/dashboard/logs : derniers logs JSON
- /api/dashboard/actions/refresh : force rafraichissement cache
- /api/dashboard/actions/restart-jean : restart Jean via WoL
- Tracking des requetes (total, jean, ollama, erreurs)
- Log buffer en memoire avec QueueHandler
2026-08-02 01:08:55 +02:00
Folzo 06285b8d4f jean-router: streaming de messages d'attente pendant le WoL
- Quand le PC est eteint/en veille, stream immediat de messages
- 'PC de jeu se reveille...' → 'Magic packet envoye...' → 'Demarrage X%...'
- Une fois pret, forward la vraie reponse en stream
- Plus de blocage silencieux, l'utilisateur voit la progression
2026-08-01 19:27:54 +02:00
Folzo f2bcfb98e3 jean-router: WoL plus robuste + retry sur echec upstream
- Retry avec WoL quand la requete upstream echoue (connexion refusee)
- Logs plus verbeux dans wait_for_jean
- Cache jean_alive reduit a 2s
2026-08-01 08:51:30 +02:00
Folzo 4f8a5288ff jean-router: ajout Wake-on-LAN
- Detection si Jean/Ollama inaccessible
- Envoi magic packet WoL vers TARGET_MAC (fallback PC_GAMING_MAC)
- Attente WAKE_TIMEOUT secondes que la machine demarre
- Integration dans get_presets, get_ollama_models, chat_completions
- Verrous pour eviter les WoL simultanes
- Active via ENABLE_WOL=true
2026-08-01 08:20:35 +02:00
Folzo 68a76aa254 jean-router: utiliser le nom d'affichage (name) comme id modele
- /v1/models expose name au lieu de l'id technique des presets Jean
- Routing: resolution name -> id interne pour le switch
- Correspondance bidirectionnelle dans chat_completions
2026-07-26 21:30:32 +02:00
Folzo cbb43ad0f3 docs: ajout procedures mise a jour OpenFox et jean-router 2026-07-22 22:00:31 +02:00
Folzo 4f95757489 jean-router: resolution dynamique des context_length + max_tokens + capabilities
- Suppression du preset_ctx_map code en dur
- Resolution dynamique: Jean /v1/models → matching Ollama → heuristique
- Ajout max_tokens / max_input_tokens dans /v1/models
- Enrichissement Ollama via /api/show pour donnees manquantes
- Detection capabilities (vision, thinking) pour presets Jean
- Auto-doublement max_tokens pour presets reasoning=on
- Timeout switch augmente a 15s avec retry
- Tracking du dernier preset actif (bypass bug Jean active=false)
- Cache TTL configurable (15s par defaut), ?refresh=true
- Plan de test des capacites LLM
2026-07-22 21:59:07 +02:00
Folzo 2e83369483 feat: add max_model_len field for OpenFox compatibility
OpenFox looks for max_model_len in /v1/models response to determine
context window size. This commit:
- Adds max_model_len field to Jean models
- Adds max_model_len field to Ollama models
- Removes dead code after return statement
2026-07-20 12:28:44 +02:00
Folzo b04fb2f245 feat: add context_length and context_window at root level for OpenFox compatibility
- Add context_length and context_window fields at model root level
- Keep them in meta for backward compatibility
- This should allow OpenFox to properly detect max context size
2026-07-20 12:18:17 +02:00
Folzo 1670f57377 fix: restore get_ollama_models() function body
The function was accidentally truncated when adding get_jean_context_lengths().
This caused TypeError: 'NoneType' object is not iterable in list_models().
2026-07-20 12:07:08 +02:00
Folzo afd340d8a4 feat: add context_length to /v1/models response
- Add get_jean_context_lengths() to fetch n_ctx from Jean /v1/models
- Add preset_ctx_map with known CTX values for each preset
- Add context_length to Jean model metadata in /v1/models
- Add context_length to Ollama model metadata from details.context_length
- This allows OpenFox to know the max tokens each model can handle
2026-07-20 12:05:48 +02:00
Folzo e9cd1edbff docs: add jean-router architecture and session journal
- Add SESSION-2026-07-20-JEAN-ROUTER.md (complete session journal)
- Add ARCHITECTURE-JEAN-ROUTER.md (new architecture documentation)
- Remove ARCHITECTURE-LITELLM.md (replaced by jean-router)
- Update README.md with jean-router, Jean backend, and VRAM management
- Document dynamic preset discovery and VRAM switching logic
2026-07-20 11:22:47 +02:00
Folzo babe4ee621 chore: add OLLAMA_KEEP_ALIVE_MINUTES=5 to docker-compose 2026-07-20 10:47:41 +02:00
Folzo 20767c2300 feat: keep Ollama models in memory for 5 minutes
- Add OLLAMA_KEEP_ALIVE_MINUTES config (default: 5)
- schedule_ollama_unload(): delays Ollama unload when switching to Jean
- cancel_ollama_unload(): cancels timer if returning to Ollama
- Ollama models stay in VRAM for X minutes after last use
- Timer resets on each Ollama request
2026-07-20 10:46:58 +02:00
Folzo 8b7c4fbd9c feat: add VRAM management for Jean/Ollama switching
- stop_jean(): stops Jean service to free VRAM before Ollama use
- start_jean(): starts Jean service when switching back from Ollama
- unload_ollama(): forces Ollama to unload models before Jean use
- ensure_vram_for_backend(): orchestrates VRAM switching
- Tracks active backend state to avoid unnecessary switches
- Configurable timeouts via environment variables
- Prevents VRAM contention between Jean and Ollama
2026-07-20 10:33:35 +02:00
Folzo 856ba4ae36 refactor: remove LiteLLM, jean-router handles all routing 2026-07-20 10:22:15 +02:00
Folzo 43aacc077d refactor: OpenWebUI points directly to jean-router (no LiteLLM needed) 2026-07-20 10:15:34 +02:00
Folzo b441f3495a fix: jean-router syntax error (missing except block) 2026-07-20 10:14:23 +02:00
Folzo fcad41521e feat: jean-router — routing dynamique Jean + Ollama
- jean-router interroge /api/presets pour lister dynamiquement les presets Jean
- Support Ollama via /api/tags pour les modèles vision
- Switch automatique de preset quand nécessaire
- Expose /v1/models avec tous les modèles disponibles
- Route les requêtes vers Jean ou Ollama selon le modèle demandé
- Nouveaux presets Jean automatiquement visibles dans OpenWebUI

Architecture:
  open-webui → LiteLLM:4000 → jean-router:3014
                                ├→ jean-proxy:3012 → Jean (.11:8080)
                                └→ wol-proxy:3011 → Ollama (.11:11434)
2026-07-20 10:10:18 +02:00
Folzo d566adbf93 fix: revert to large-v3 — distil model outputs English on French audio 2026-06-28 12:44:59 +02:00
Folzo eadc6a0a88 fix: force STT French language + initial prompt (ignore client auto) 2026-06-28 12:42:39 +02:00
Folzo 8e683ca4fd perf: STT optimization — distil-large-v3 + 8 threads (2x faster)
- Switched from large-v3 (1.56B) to distil-large-v3 (~756M) — 2x faster transcription
- Increased CPU threads from 4 to 8 (Ryzen 5800X3D has 8c/16t)
- French language quality preserved (~5% accuracy tradeoff for 2x speed)
- Expected pipeline latency: 4-5s total (down from ~15s)
2026-06-28 12:36:08 +02:00
Folzo 1f55f12331 refactor: LiteLLM unified routing via JeanOrchestrator
- All models now route through single jean-proxy:3012 → orchestrator:8080
- Removed jean-proxy-moe (no longer needed with auto-switch orchestrator)
- Added qwen3.6-moe and qwen3.6-moe-reason model routes
- Updated architecture comments
2026-06-28 11:45:00 +02:00
Folzo 1b4764e9fa fix(litellm): open-webui via OpenAI API (pas Ollama) + 3 profils Qwen3.6
LiteLLM expose l'API OpenAI /v1/* pas l'API Ollama /api/*. open-webui
doit etre branche via la section 'OpenAI API' (env OPENAI_API_BASE_URL +
OPENAI_API_KEY), pas via 'Ollama'. L'override ajoute ces vars a open-webui,
force-recreate pour propager. Confirme en prod: HTTP 200 sur :4000/v1/models
depuis le conteneur open-webui. Les 4 modeles Qwen3.6 remontent dans le chat.
2026-06-27 16:51:51 +02:00
Folzo 7a8dc34212 feat(litellm): 3 profils Qwen3.6 (reason/fast/default) via toggle enable_thinking
Contrainte VRAM: RX 7800 XT 16Go ne peut pas co-heberger Qwen3.6-27B
(14.6 Go) + llama3.1-8b (5 Go). Ollama commente, on expose 3 profils
du meme modele Qwen3.6 via le toggle chat_template_kwargs.enable_thinking:
  - qwen3.6-reason / qwen3.6-27b : raisonnement ON (taches complexes)
  - qwen3.6-fast / qwen3.6       : raisonnement OFF (chat rapide ~400ms TTFT)
drop_params=false pour passer chat_template_kwargs a Jean.
Teste en prod: qwen3.6-fast repond BONJOUR en 400ms, MTP 3/3 acceptes.
2026-06-27 16:40:24 +02:00
Folzo 2a9f721c4e feat: LiteLLM multi-backends + jean-proxy avec WoL
Architecture (voir docs/ARCHITECTURE-LITELLM.md):
  open-webui -> LiteLLM:4000
                 |- qwen3.6-27b -> jean-proxy:3012 -> Jean (.11:8080)
                 |- llama3.1-8b -> wol-proxy:3011  -> Ollama (.11:11434)

Nouveaux fichiers:
- wol-proxy/ (versionne l'app.py de prod deja en place)
- jean-proxy/ (clone du wol-proxy avec HEALTH_PATH=/health + retry post-WoL
  pour services qui mettent du temps a demarrer apres WoL, ex: Jean qui
  charge 14 Go en VRAM)
- litellm/config.yaml (routing par nom de modele, drop_params=true)
- docker-compose.litellm.yml (override ADDITIF: ajoute uniquement jean-proxy
  et litellm, ne redemarre PAS open-webui/wol-proxy/hermes)

Teste en prod sur .27: Jean + Ollama repondent via LiteLLM:4000 avec
path-through de chat_template_kwargs.enable_thinking (raisonnement Qwen3.6
desactivable par requete). Zero impact hermes-webui/wol-proxy.
Basculer open-webui reste une etape manuelle (step 3 de la doc).
2026-06-27 16:19:08 +02:00
Folzo 2f270aeca8 Ajout roadmap orchestrateur wol-proxy 2026-06-14 07:58:39 +02:00
Folzo 7a4d889899 Augmente WAKE_TIMEOUT a 180s (configurable via .env) 2026-06-13 21:08:47 +02:00
Folzo 4acea1ce6d fix: Joplin Tool uses Clipper API (localhost:41184) not Server API
- Server API (/api/items/) does not expose note CRUD, only sync protocol
- Clipper API is the only way to read/write notes remotely
- Requires Joplin desktop open + Web Clipper enabled
- Added ping() function to check connectivity
- Valves: joplin_url, joplin_api_token
2026-05-14 19:34:35 +02:00
Folzo 3e18930dbd feat: add Joplin Tool for Open WebUI (Clipper API)
- Uses local Joplin Clipper API (localhost:41184)
- 11 functions: notebooks, notes, search, create, update, TODOs, delete, ping
- Valves: joplin_url (default 192.168.1.11:41184), joplin_api_token
- Requires Joplin desktop open + Web Clipper enabled
- Synced via Joplin Server (joplin.folzocorp.fr)
2026-05-14 19:11:34 +02:00
Folzo 873432362a feat: add Leantime Open WebUI Tool (direct API, no MCPO needed)
- Tool with Valves (leantime_url, leantime_api_key)
- 14 functions: projects, tickets, comments, users, timesheets, status labels
- JSON-RPC 2.0 client matching Leantime API
- Activate/deactivate per conversation in Open WebUI
2026-05-10 22:28:28 +02:00
Folzo c4467d0da2 feat: integrate Leantime project management via MCP (leantime-mcp + MCPO)
- Add leantime-mcp Dockerfile (daniel-eder/leantime-mcp, SSE transport)
- Add leantime-mcp service to docker-compose.yml on effi-net
- Add Leantime env vars to .env.example (API_KEY, USER_EMAIL, URL)
- Update services.md: Leantime + leantime-mcp entries, dependency diagram, resource table
- Update mcp-et-n8n.md: MCPO config with leantime SSE server, new leantime-mcp section
- Add LEANTIME-INSTALLATION.md: full reinstall guide (XPenology + MCP)
2026-05-10 17:53:21 +02:00
Folzo 21674f6eaf feat: Add SearXNG for improved web search
- Add SearXNG service to docker-compose.yml (port 11112)
- Add SEARXNG_SECRET_KEY to .env.example
- Add searxng-data/settings.yml with FR engines (google, bing, ddg, qwant)
- Add docs/SEARXNG-INTEGRATION.md with OpenWebUI tool setup
2026-04-13 19:59:01 +02:00
Folzo 4f1a6cf0ce Add session doc: Joplin RAG integration + RAG config optimization
- Document Joplin export process (JEX = TAR archive)
- Clean 78 notes from 111 files (removed folders)
- Config RAG optimization: markdown headers, bge-m3, batch=32
- RAG test: 42 sources found, retrieval works
- Note: Prompt RAG needs improvement for more direct responses
2026-04-12 22:37:09 +02:00
Folzo fdcf513baf feat: add effi-ocr tool with Valves configuration and improved file search
- Added Valves (Pydantic) pattern for ocr_url configuration via wheel icon
- Inspired by Kreuzberg tool: multi-level file search (exact, substring, word matches)
- Support for multi-file OCR with extract_text_from_images
- Added search_files function for pattern matching
- effi-ocr runs on port 8301 (Tesseract with preprocessing)
2026-04-12 17:52:42 +02:00
Folzo 82ea2313f0 docs: add Effi system prompt - original and optimized versions
- Original prompt kept for reference (200+ lines, too verbose)
- New optimized prompt: ~40 lines, -75% tokens
- Added table for tools usage (Kreuzberg, web_search, sub-agent, etc.)
- Optimized version includes explicit Kreuzberg usage for OCR
2026-04-12 16:41:13 +02:00
Folzo 189ff4eaab docs: April 2026 optimizations - gemma4:e4b, RAG, Ollama service
- LLM principal: gemma4:e4b (9.6GB, 128K context, MMLU 82.6%)
- Ollama service systemd with optimization vars (FLASH_ATTENTION, KV_CACHE)
- RAG: RAG_SYSTEM_CONTEXT=True, ENABLE_RAG_HYBRID_SEARCH=True
- ComfyUI memory manager: fix timestamp parsing (execution_success)
2026-04-12 16:19:14 +02:00
Folzo 49d7afdf1f docs: restore Structure du Projet section 2026-04-12 14:36:53 +02:00
Folzo 8f472170f6 docs: add Beszel tool improvements + update README
- README: add Tool OpenWebUI section with current features
- README: update Historique with Tool section
- Tool doc: add Limitations and Future Improvements sections

Future improvements noted:
- Support historique (données N dernières minutes)
- Filtres par période
- Graphiques et alertes automatisées
2026-04-12 14:34:29 +02:00
Folzo cf406b764f fix: Beszel tool - correct PocketBase API endpoints
- Changed /api/auth/login to /api/collections/users/auth-with-password
- Changed /api/systems to /api/collections/systems/records
- Added proper error messages for connection issues
2026-04-12 13:59:50 +02:00
Folzo 26e6b89229 fix: Use Pydantic Valves pattern for OpenWebUI tool config
- Add BaseModel Valves class with configurable parameters
- beszel_url, beszel_user, beszel_password as configurable valves
- Matches ACE Step tool pattern for UI configuration
2026-04-12 13:46:20 +02:00
Folzo 6212aa6f27 fix: Use hardcoded config in Beszel tool - no env vars needed 2026-04-12 13:42:44 +02:00
Folzo 3dbd2bcc17 fix: Rename class to Tools for OpenWebUI compatibility 2026-04-12 13:39:12 +02:00
Folzo b42cfcabce feat: Add Beszel tool for OpenWebUI
Permet à Effi de:
- get_all_stats() - Stats de tous les systèmes
- get_system_stats('folzocorp') - Stats d'un système
- check_alerts() - Vérifier les alertes
- get_gpu_status('folzocorp') - Status GPU AMD
- can_run_comfyui() - Vérifier si ComfyUI peut tourner
2026-04-12 13:01:48 +02:00
Folzo 4fff805c3d feat(beszel): Add NAS Synology agent configuration 2026-04-12 12:51:00 +02:00
Folzo f425294473 fix: ComfyUI memory manager - only consider recent history (last 5min)
- Fix bug where old history entries were counted as recent activity
- Added recent_threshold parameter (default 300s)
- is_recent_history() now checks timestamp of last history item
2026-04-12 12:37:18 +02:00