#!/usr/bin/env bash # B9 probe / tier1 with temporary dev model override — model A/B comparison. # # Usage: # bash scripts/butler-eval-b9-probe-model.sh deepseek/deepseek-reasoner # bash scripts/butler-eval-b9-probe-model.sh --compare minimax/MiniMax-M3 deepseek/deepseek-reasoner # bash scripts/butler-eval-b9-probe-model.sh --tier1 deepseek/deepseek-reasoner set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$ROOT" export PYTHONPATH="$ROOT" export BUTLER_EVAL_LLM_BENCHMARK=1 COMPARE=0 TIER1=0 MODELS=() while [[ $# -gt 0 ]]; do case "$1" in --compare) COMPARE=1; shift ;; --tier1) TIER1=1; shift ;; -h|--help) echo "Usage: $0 [--compare|--tier1] [provider/model ...]" echo " default compare: minimax/MiniMax-M3 deepseek/deepseek-chat deepseek/deepseek-reasoner" echo " --tier1: run tier1 LIVE fixed tasks (release gate subset) instead of 3-task probe" exit 0 ;; *) MODELS+=("$1"); shift ;; esac done if [[ ${#MODELS[@]} -eq 0 ]]; then if [[ "$COMPARE" -eq 1 ]]; then MODELS=("minimax/MiniMax-M3" "deepseek/deepseek-chat" "deepseek/deepseek-reasoner") else echo "需要至少一个 provider/model,例如 deepseek/deepseek-reasoner" >&2 exit 1 fi fi if [[ -f "$ROOT/.env" ]]; then set -a # shellcheck disable=SC1091 source "$ROOT/.env" 2>/dev/null || true set +a fi MODELS_JSON=$(printf '%s\n' "${MODELS[@]}" | python3 -c 'import json,sys; print(json.dumps([l.strip() for l in sys.stdin if l.strip()]))') python3 - <