A Magpie dial for Gemini CLI passed 7 of 7 keyless checks without calling Gemini
We pinned Magpie and validated a Gemini CLI dial profile with a quota-failover stub, no keys. 7 of 7 lab steps and 10 of 10 tests passed in 4,693 ms.
By David Discua
Measured in the lab
- 7
- lab steps passed
- 10
- tests passed
- 4693 ms
- suite time
- profile requires magpie_no_accounts: true
- Gemini agent must route through Magpie
- failover stub moves flash to pro on quota
- skills layout, banned phrases, upstream parity pass
From reports/dial.json · run on October 14, 2026. Magpie pin e297a8ab; MAGPIE_NO_ACCOUNTS=1; Python 3.14.7, pytest 9.1.1; keyless lab suite only, upstream GTK suite runs in Linux CI
How it is wired
01/03Gemini CLI sends its requests to Magpie on your machine.
Magpie is a local gateway for coding agents. You keep one provider list, and routing groups move a request to the next account or model when a quota window runs out. We pinned Magpie, wrote a dial profile that routes Gemini CLI through it with a two-model failover group, and validated that profile with no API key. All 7 lab steps and all 10 tests passed in 4,693 ms, and Gemini was never called, which also means Magpie's real routing was never exercised.
The catch
The failover in this lab is an in-process Python stub. It reads the members list, marks the first one quota-exhausted, and returns the next. It does not run Magpie or watch a real quota window. The validator checks structure: required keys, route: magpie, an allowed auth value, provider/model names, an http base URL, an allowed strategy (next, pace or round-robin) and at least two failover members. It cannot tell you whether 127.0.0.1:3425 answers or whether your key has quota left.
Failover also changes which model answers. In our profile the group starts on google/gemini-2.5-flash and moves to google/gemini-2.5-pro when flash runs out of quota, so a quota event switches your agent to a different model in the middle of a task. Decide on that order before it happens, and keep an eye on what the second member costs you.
The validator refuses any profile without privacy.magpie_no_accounts: true, and every lab run sets MAGPIE_NO_ACCOUNTS=1, which turns off Magpie's subscription-account discovery. Upstream's own Linux suite (gofmt, go vet and go test with the gtk3 tag) needs GTK and WebKit packages, runs only in the lab's CI upstream job, and is not part of this report.
What we ran (keyless)
export MAGPIE_NO_ACCOUNTS=1 DISABLE_TELEMETRY=1 DO_NOT_TRACK=1
uv sync --locked --group dev
uv run magpie-dial tests/fixtures/gemini-profile.yaml
uv run magpie-dial tests/fixtures/gemini-profile.yaml --simulate-failover
uv run ruff check .
uv run pytest -q
python3 scripts/check-upstream-parity
The profile under test, from tests/fixtures/gemini-profile.yaml:
name: gemini-dial
privacy:
magpie_no_accounts: true
agents:
gemini:
route: magpie
auth: gemini-api-key
model: google/gemini-2.5-flash
base_url: http://127.0.0.1:3425
failover:
group: gemini-quota
strategy: next
members:
- google/gemini-2.5-flash
- google/gemini-2.5-pro
From reports/dial.json, run on October 14, 2026 (Python 3.14.7, ruff 0.17.0, pytest 9.1.1):
| Step | Result | Time |
|---|---|---|
uv sync | pass | 77 ms |
ruff check | pass | 142 ms |
ruff format --check | pass | 170 ms |
pytest | 10 passed, 0 failed | 3,438 ms |
| skills layout | pass | 464 ms |
| banned phrases | pass | 111 ms |
| upstream parity | pass | 288 ms |
Total elapsed was 4,693 ms with 0 failed steps.
How it is wired
Magpie runs on your machine and sits between the agent and the model providers. Gemini CLI points at Magpie's local base URL, and Magpie picks the model from the routing group. The lab skill magpie-gemini-dial tells the agent to keep MAGPIE_NO_ACCOUNTS=1, validate the dial YAML, and check the failover order before a live run. A live run needs GEMINI_API_KEY, which stays optional and out of CI.
Minilab (open source)
Upstream is yetone/magpie: 12,695 stars, MIT, Go, as of October 14, 2026. Swap in your own profile, run uv run magpie-dial <profile.yaml> --simulate-failover, and confirm the next model is the one you expect.
Run it yourself
SkilledDragonCorp/minilab-magpie-gemini-dial
Clone, install and run the report with no API keys. The numbers above are what that run writes.
uv sync --locked --group dev && uv run magpie-dial tests/fixtures/gemini-profile.yamlSkilledDragon is not affiliated with Magpie or its authors, or with Google. Numbers are from our own keyless lab run; re-run the report before relying on them. Marks belong to their owners.
All labs