#!/bin/bash
# vLLM + custom NoOpConnector loaded by dotted path.
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"

KV_CFG='{"kv_connector":"NoOpConnector","kv_connector_module_path":"microbench.connector_tax.tools.noop_connector","kv_role":"kv_both"}'

CUDA_VISIBLE_DEVICES="$GPU_ID" \
"$PYTHON" -m vllm.entrypoints.openai.api_server \
    "${COMMON_VLLM_ARGS[@]}" \
    --kv-transfer-config "$KV_CFG" \
    > "$LOG_DIR/vllm_stdout.log" 2> "$LOG_DIR/vllm_stderr.log" &
VLLM_PID=$!
echo "$VLLM_PID" > "$LOG_DIR/.vllm.pid"
echo "vLLM PID=$VLLM_PID"
wait_for_ready 240
