model-config

model-config is a command for Claude Code from alinaqi/maggy. It costs 0 tokens per session (661 once invoked), scanned B, original, MIT.

A command for viewing or changing the primary AI model used for coding work across several connected tools.

In plain words
What is it for?
Use it to see the current model and available models, or set a supported model such as minimax, claude, or deepseek.
Why use it?
It gives those tools one shared model setting instead of requiring the model choice to be changed separately in each place.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: reads .claude/ paths.

Good fit Use it to see the current model and available models, or set a supported model such as minimax, claude, or deepseek.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alinaqi/maggy/model-config
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/alinaqi/maggy

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for model-config

README.md
[![agentmods](https://agentmods.dev/badge/commands/alinaqi/maggy/model-config.svg)](https://agentmods.dev/commands/alinaqi/maggy/model-config)
Your own site
<a href="https://agentmods.dev/commands/alinaqi/maggy/model-config"><img src="https://agentmods.dev/badge/commands/alinaqi/maggy/model-config.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 661 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00661
Opus 5 $0.00000 $0.00331
Sonnet 5 $0.00000 $0.00132
Haiku 4.5 $0.00000 $0.00066

Measured 8d ago against content hash a604139d6846, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

model-config scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

MR="$(cat ~/.claude/.bootstrap-dir)/scripts/model_routing.py"
commands/model-config.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/model-config — Choose the model you follow

View or change the primary model that handles your coding work across srooter (the gateway), the route-task hooks, and Maggy. One setting, read everywhere. Stored in ~/.claude/model-config.json.


Usage

/model-config — show current primary + what's available /model-config <model> — set the primary (e.g. minimax, claude, deepseek)


Steps

The brain is scripts/model_routing.py in claude-bootstrap. Resolve it via ~/.claude/.bootstrap-dir:

MR="$(cat ~/.claude/.bootstrap-dir)/scripts/model_routing.py"

1. Show current state (no argument)

echo "Available on this machine:"
python3 "$MR" detect | python3 -c "import sys,json;print(', '.join(k for k,v in json.load(sys.stdin).items() if v))"
echo "Current config:"
python3 "$MR" show

Report: which model is primary, the classifier, the mode (smart/hard), and the available models. If auto_detected is true, mention it was inferred from the machine and can be overridden.

2. Set a new primary (argument given)

python3 "$MR" set-primary "<model>"     # validates against the detected set
python3 "$MR" apply                     # sync into srooter.yaml long_context

Then tell the user it takes effect for new sessions. If srooter is running, it must be restarted to pick up the routing change:

cd "$(cat ~/.claude/.bootstrap-dir)/../srooter" 2>/dev/null && \
  echo "Restart srooter to apply: kill \$(cat .srooter.pid); and relaunch"

Notes

  • Smart mode (default): the primary handles real coding; trivial/cheap asks still route to the local classifier (qwen) and explicit per-prompt overrides ("use claude") always win.
  • No hardcoding — if the config is missing it is auto-created from what's installed/keyed on the machine.

Pre-analysis (MiniMax on every prompt)

When "analyze": true (default), the route-task hook sends each prompt to MiniMax first for a terse INTENT / SCOPE / RISKS / APPROACH brief and injects it into context, so Claude executes with that read of the task. Adds ~3-5s per prompt. Toggle:

Read the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 82 lines · 0 tokens per session scan B a604139d6846

Subscribe to this mod's changes

model-config is a command published in the GitHub repository alinaqi/maggy (705 stars, last pushed 20d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 661 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.