LLM Services (app/services/llm/ — 20 modules)

The LLM domain handles model discovery, download, inference routing, and multi-backend execution.

ServiceKey ClassResponsibility
llm_manager.pyLLMManagerModel discovery (HuggingFace, Ollama), download, validation, recommendation
llm_environment.pyget_llm_env()LLM virtual environment lifecycle
inference_service.pyInferenceServiceMulti-backend chat inference routing (llama.cpp, vLLM, MLX)
llama_server_manager.pyLlamaServerManagerllama.cpp server lifecycle
vllm_server_manager.pyVLLMServerManagervLLM server lifecycle
mlx_server_manager.pyMLXServerManagerMLX-LM server lifecycle (Apple Silicon)
huggingface_service.pyHuggingFaceServiceHuggingFace Hub API: search, download, metadata
model_download_service.pyModelDownloadServiceModel download with progress tracking
model_recommendation.pyModelRecommendationServiceHardware-aware model recommendations
model_validation_service.pyModelValidationServiceModel integrity and compatibility checks
model_router.pyModelRouterSelect optimal backend per model (format, size, GPU)
chat_execution_service.pyChatExecutionServiceFull chat completion orchestration
chat_intent_preflight_service.pyChatIntentPreflightServiceIntent analysis before model routing
tool_calling.pyToolCallingServiceFunction/tool calling integration
vision_support.pyVisionSupportMulti-modal image processing for LLMs
ai_service_orchestrator.pyAIServiceOrchestratorTop-level orchestration across all AI services
ai_service_model_manager.pyAIServiceModelManagerUnified model lifecycle across service types
ai_service_curated_models.pyCuratedModelsCurated model catalog with metadata

Audio Services

ServiceRouteDescription
speech_to_text_service.py/audio/speech-to-textWhisper-based transcription
text_to_speech_service.py/audio/text-to-speechMulti-engine TTS (Edge, Google, Coqui, system voices)
voice_to_voice_service.py/audio/voice-to-voiceVoice conversion (pitch, time stretch)

Vision & Media Services

ServiceRouteDescription
vision_runtime_service.py/visionVision model inference and processing
text_to_image_service.py/text-to-imageImage generation from text prompts
object_detection_service.py—Object detection and classification
document_runtime_service.py/document-extractionDocument and media processing
ml_model_service.py/ml-modelsML model registry, versioning, validation

Document Extraction

ServiceDescription
document_extraction_environment.pyDocument extraction environment lifecycle
document_extractor.pyPDF, Office, image parsing and text extraction
ocr_engine_registry.pyOCR engine registration and discovery
ocr_engine_tracker.pyOCR engine status and health

Fine-Tuning

ServiceDescription
finetune/finetune_service.pyFine-tuning orchestration
finetune/finetune_environment.pyFine-tuning environment management
finetune/finetune_standard/Standard fine-tuning implementations