mm scripts: default to MiniMax-M3.1-Flash-Preview with per-script effort

Flash is the default model; --m3 falls back to M3, --effort overrides.
Defaults: max (review-minimax, review-loop, mm-worktree-task), medium
(explore), low (ci-triage). ask-minimax-run applies MINIMAX_EFFORT to
Flash models when --effort is not passed. Bump stale fixture date.
This commit is contained in:
Paul O'Reilly
2026-10-13 10:23:53 +13:00
parent d6e0220bf5
commit 840d7509e1
16 changed files with 134 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Run a read-only codebase exploration sweep in a MiniMax M3 sub-session.
# Run a read-only codebase exploration sweep in a MiniMax sub-session.
# Wraps ask-minimax-run with the hardening the exploration case needs:
# - --add-dir per search root (paths outside cwd are otherwise denied)
# - secrets-root refusal + skip-list in the prompt preamble
@@ -11,7 +11,8 @@
# Usage:
# explore-minimax-run --root <path> [--root <path> ...] \
# --prompt-file <question-file> --out <result-file> \
# [--breadth medium|very-thorough] [--max-turns N] [--timeout SECS]
# [--breadth medium|very-thorough] [--max-turns N] [--timeout SECS] \
# [--m3] [--effort low|medium|high|xhigh|max]
#
# Exit codes:
# 0 answer written to --out
@@ -20,7 +21,7 @@
# 3 ran but answer is empty or carries no file:line citations — fall back to an Explore agent
set -euo pipefail
usage() { grep '^#' "$0" | sed 's/^# \{0,1\}//' | sed -n '2,20p'; }
usage() { grep '^#' "$0" | sed 's/^# \{0,1\}//' | sed -n '2,21p'; }
ROOTS=()
PROMPT_FILE=""
@@ -28,6 +29,8 @@ OUT_FILE=""
BREADTH="medium"
MAX_TURNS=40
TIMEOUT_SECS=540
USE_M3=0
EFFORT_ARG=""
while [[ $# -gt 0 ]]; do
case "$1" in
@@ -37,10 +40,14 @@ while [[ $# -gt 0 ]]; do
--breadth) BREADTH="$2"; shift 2 ;;
--max-turns) MAX_TURNS="$2"; shift 2 ;;
--timeout) TIMEOUT_SECS="$2"; shift 2 ;;
--m3) USE_M3=1; shift ;;
--effort) EFFORT_ARG="$2"; shift 2 ;;
-h|--help) usage; exit 0 ;;
*) echo "error: unknown argument '$1'" >&2; usage >&2; exit 1 ;;
esac
done
if [[ $USE_M3 -eq 1 ]]; then MODEL="MiniMax-M3"; EFFORT="$EFFORT_ARG"; else MODEL="MiniMax-M3.1-Flash-Preview"; EFFORT="${EFFORT_ARG:-medium}"; fi
[[ -z "$EFFORT" || "$EFFORT" =~ ^(low|medium|high|xhigh|max)$ ]] || { echo "error: --effort must be low|medium|high|xhigh|max" >&2; exit 1; }
[[ ${#ROOTS[@]} -gt 0 ]] || { echo "error: at least one --root required" >&2; exit 1; }
[[ -n "$PROMPT_FILE" && -f "$PROMPT_FILE" ]] || { echo "error: --prompt-file missing or not a file" >&2; exit 1; }
@@ -109,7 +116,7 @@ run_once() {
# --disallowedTools: the minimax profile defaults to acceptEdits and allows
# Edit(/tmp/**)/WebFetch at user level; deny beats allow.
timeout "$TIMEOUT_SECS" ask-minimax-run \
--model MiniMax-M3 \
--model "$MODEL" ${EFFORT:+--effort "$EFFORT"} \
--permission-mode default \
--allowedTools "Read,Glob,Grep" \
--disallowedTools "Write,Edit,MultiEdit,NotebookEdit,Bash,WebFetch,WebSearch" \