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:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# First-pass code review of a git branch in a MiniMax M3 sub-session.
|
||||
# First-pass code review of a git branch in a MiniMax sub-session.
|
||||
# The wrapper materialises the diff/log itself (the sub-session gets no Bash),
|
||||
# runs MiniMax read-only except for one findings file, and gates the result.
|
||||
# Spec: specs/review-minimax-run.spec.md. Used by /review-minimax; safe directly.
|
||||
@@ -7,7 +7,7 @@
|
||||
# Usage:
|
||||
# review-minimax-run --worktree <path> [--base <ref>] [--out <findings-file>]
|
||||
# [--profile agent-runtimes] [--max-diff-lines N] [--max-turns N]
|
||||
# [--timeout SECS] [--dryrun|-n]
|
||||
# [--timeout SECS] [--dryrun|-n] [--m3] [--effort low|medium|high|xhigh|max]
|
||||
#
|
||||
# Exit codes:
|
||||
# 0 findings file written (may contain "NO FINDINGS")
|
||||
@@ -25,6 +25,8 @@ PROFILE=""
|
||||
MAX_DIFF_LINES=6000
|
||||
MAX_TURNS=40
|
||||
TIMEOUT_SECS=540
|
||||
USE_M3=0
|
||||
EFFORT_ARG=""
|
||||
DRYRUN=0
|
||||
# RM-3: credential-shaped content in the diff aborts the review outright.
|
||||
CRED_PATTERN='ghp_[A-Za-z0-9]|glpat-|x-access-token:|Authorization:|BEGIN [A-Z ]*PRIVATE KEY|AKIA[0-9A-Z]{16}'
|
||||
@@ -38,11 +40,15 @@ while [[ $# -gt 0 ]]; do
|
||||
--max-diff-lines) MAX_DIFF_LINES="$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 ;;
|
||||
--dryrun|-n) DRYRUN=1; shift ;;
|
||||
-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[1m]"; EFFORT="$EFFORT_ARG"; else MODEL="MiniMax-M3.1-Flash-Preview"; EFFORT="${EFFORT_ARG:-max}"; fi
|
||||
[[ -z "$EFFORT" || "$EFFORT" =~ ^(low|medium|high|xhigh|max)$ ]] || { echo "error: --effort must be low|medium|high|xhigh|max" >&2; exit 1; }
|
||||
|
||||
# --- RM-1 preflight -----------------------------------------------------------
|
||||
[[ -n "$WORKTREE" ]] || { echo "error: --worktree required" >&2; exit 1; }
|
||||
@@ -172,7 +178,7 @@ if [[ "$DRYRUN" -eq 1 ]]; then
|
||||
echo "-- prompt --"
|
||||
cat "$FULL_PROMPT"
|
||||
echo "-- command --"
|
||||
echo "cd $WORK_DIR && timeout $TIMEOUT_SECS ask-minimax-run --model 'MiniMax-M3[1m]'" \
|
||||
echo "cd $WORK_DIR && timeout $TIMEOUT_SECS ask-minimax-run --model '$MODEL'${EFFORT:+ --effort $EFFORT}" \
|
||||
"--permission-mode default --allowedTools 'Read,Glob,Grep,Write'" \
|
||||
"--disallowedTools 'Edit,MultiEdit,NotebookEdit,Bash,WebFetch,WebSearch'" \
|
||||
"--max-turns $MAX_TURNS --output-format json --add-dir $WORKTREE --add-dir $OUT_DIR -p < prompt.txt"
|
||||
@@ -189,7 +195,7 @@ run_once() {
|
||||
return 0
|
||||
fi
|
||||
( cd "$WORK_DIR" && timeout "$TIMEOUT_SECS" ask-minimax-run \
|
||||
--model "MiniMax-M3[1m]" \
|
||||
--model "$MODEL" ${EFFORT:+--effort "$EFFORT"} \
|
||||
--permission-mode default \
|
||||
--allowedTools "Read,Glob,Grep,Write" \
|
||||
--disallowedTools "Edit,MultiEdit,NotebookEdit,Bash,WebFetch,WebSearch" \
|
||||
|
||||
Reference in New Issue
Block a user