from pathlib import Path

from inspect_ai.model import get_model
from inspect_ai.solver import generate, system_message

from bench_af._abstract.objects import ModelOrganism

CURRENT_DIRECTORY = Path(__file__).parent


def get() -> ModelOrganism:
    with open(CURRENT_DIRECTORY/"default_system_prompt.md") as f:
        system_prompt = f.read()

    # First, start the local vllm server
    """ vllm serve "Qwen/Qwen3-235B-A22B" --tensor-parallel-size 8 --enable-auto-tool-choice  --tool-call-parser hermes

    $ export VLLM_BASE_URL=http://localhost:8000/v1
        $ export VLLM_API_KEY=your-key

    $  """

    model_organism = ModelOrganism(
        name=CURRENT_DIRECTORY.name,
        model=get_model(model="vllm/Qwen/Qwen3-235B-A22B"),
        solver=[system_message(system_prompt), generate()],
        supported_environments={"self_exfiltrate",
                                "mvp", "blackmail", "blackmail_no_tools", "report_resources"}
    )
    return model_organism
