"""Metadata introspection for the Voxtral VLLM plugin used by cjm-ctl to generate the registration manifest."""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/meta.ipynb.

# %% auto 0
__all__ = ['get_plugin_metadata']

# %% ../nbs/meta.ipynb 3
import os
import sys
from typing import Any, Dict

# %% ../nbs/meta.ipynb 4
def get_plugin_metadata() -> Dict[str, Any]: # Plugin metadata for manifest generation
    """Return metadata required to register this plugin with the PluginManager."""
    # Calculate default DB path relative to the environment
    base_path = os.path.dirname(os.path.dirname(sys.executable))
    data_dir = os.path.join(base_path, "data")
    db_path = os.path.join(data_dir, "voxtral_vllm_transcriptions.db")
    
    # Ensure data directory exists
    os.makedirs(data_dir, exist_ok=True)

    return {
        "name": "cjm-transcription-plugin-voxtral-vllm",
        "version": "1.0.0",
        "type": "transcription",
        "category": "transcription",
        "interface": "cjm_transcription_plugin_system.plugin_interface.TranscriptionPlugin",
        
        "module": "cjm_transcription_plugin_voxtral_vllm.plugin",
        "class": "VoxtralVLLMPlugin",
        
        # Critical: The absolute path to THIS environment's python
        "python_path": sys.executable,
        
        "db_path": db_path,
        
        # Voxtral via vLLM requires significant GPU resources
        # Mini: ~8GB VRAM, Small: ~48GB VRAM
        "resources": {
            "requires_gpu": True,
            "min_gpu_vram_mb": 8192,       # Minimum for Voxtral-Mini
            "recommended_gpu_vram_mb": 16384,  # Comfortable for Mini with KV cache
            "min_system_ram_mb": 16384
        },
        
        "env_vars": {
            "CUDA_VISIBLE_DEVICES": "0",
            "VLLM_ATTENTION_BACKEND": "FLASHINFER",  # Recommended for vLLM
        }
    }
