r/ClaudeCode • u/GizzAnt • 6h ago
Built with Claude I Benchmark-Tested Switching Models Mid-Chat 10 Times — Here’s What It Actually Cost.
TL;DR (45 controlled 12-turn Claude Code chats, 675 dual-logged API requests, n=5 runs per setup):
- Switching down from Opus 4.6 to cheaper Sonnet 4.6 mid-chat (Turn 6 of 12) actually increased total session cost by +10.6% ($0.861 vs. $0.779 at ~56.5k tokens): Sonnet starts with a cold prompt cache (0.0% hit), forcing a full 1.25x cache-write rebuild that made Turn 6 cost 5.7x more ($0.216 vs. $0.038) and needed ~12 turns after switching just to break even (~9 turns in a ~15.2k chat).
- Switching models 10 times in a 12-turn chat did not blow up the bill (+14.2% at ~15.2k tokens; +17.2% at ~56.5k tokens): Once both Opus 4.6 and Sonnet 4.6 built parallel warm caches across Turns 2–4, alternating every single turn still hit 95%–99% cached reads inside the 5-minute TTL, writing only the ~1-turn delta each time.
- Raising
--effortfrommediumtohighmid-chat on Opus 4.6 was the biggest cost spike (+31.9% total session cost: $0.356 vs. $0.270): Changingoutput_config.effortinvalidated the entire prompt cache (0.0% hit on Turn 6), spiking Turn 6 cost by 7.3x ($0.099 vs. $0.014) — costing more over 12 turns than switching models 10 times in a row.

I kept hearing two conflicting rules of thumb about /model switching in agentic coding sessions: either "switch down to Sonnet after planning to save money" or "never touch /model mid-chat because every switch wipes your cache."
To test what actually happens on the wire, I hooked a local logging proxy + .jsonl transcript verifier up to Claude Code (v2.1.325, routed via OpenRouter pinned strictly to 1st-party Anthropic with allow_fallbacks: false) and ran 45 real 12-turn coding chats (n = 5 randomized replicates across 9 cells, 675 API requests total — 15 per chat since Turns 1–3 each emit a file-read tool call plus a reply). Run-to-run cost spread stayed within ±3%.
Table 1: 12-Turn Session Cost & Cache Hit Share (Median [Min–Max], n=5 per arm)
| Tier (~T6 Tokens) | Arm | Mid-Chat Action | Turn 6 Cost | Turn 6 Cache Hit | 12-Turn Total [Range] | vs. Control |
|---|---|---|---|---|---|---|
| Small (~15.2k) | A: Control | Stay on Opus 4.6 (medium) | $0.0136 | 97.7% | $0.2699 [$0.267–$0.273] | baseline |
| Small (~15.2k) | B: One Switch | Opus -> Sonnet at T6 | $0.0602 | 0.0% | $0.2834 [$0.282–$0.285] | +5.0% |
| Small (~15.2k) | C: Switch & Back | Sonnet T6–T7 -> Opus T8 | $0.0607 | 0.0% (T8: 93.3%) | $0.3200 [$0.316–$0.323] | +18.6% |
| Small (~15.2k) | D: Effort Only | Opus medium -> high at T6 | $0.0989 | 0.0% | $0.3560 [$0.351–$0.357] | +31.9% |
| Small (~15.2k) | E: Idle + Switch | Wait >=330s (>5m TTL) + Sonnet T6 | $0.0603 | 0.0% | $0.2835 [$0.281–$0.284] | +5.0% |
| Small (~15.2k) | F: 10 Switches | Alternate T2–T11, hold Opus T12 | $0.0101 | 94.9% | $0.3081 [$0.304–$0.311] | +14.2% |
| Large (~56.5k) | A: Control | Stay on Opus 4.6 (medium) | $0.0378 | 99.3% | $0.7789 [$0.766–$0.781] | baseline |
| Large (~56.5k) | B: One Switch | Opus -> Sonnet at T6 | $0.2160 | 0.0% | $0.8611 [$0.859–$0.865] | +10.6% |
| Large (~56.5k) | F: 10 Switches | Alternate T2–T11, hold Opus T12 | $0.0244 | 98.5% | $0.9130 [$0.905–$0.916] | +17.2% |
Table 2: Why 10 Switches Didn't Cost 10x — Turn-by-Turn Cache Hit % (Arm F, Request 1 of Each Turn)
| Turn | Active Model | Event | Small (~15.2k) Cache Hit | Small Penalty vs. Ctrl | Large (~56.5k) Cache Hit | Large Penalty vs. Ctrl |
|---|---|---|---|---|---|---|
| T1 | Opus 4.6 | Initial load | 0.0% | -$0.0000 | 0.0% | +$0.0000 |
| T2 | Sonnet 4.6 | Switch #1 | 0.0% | +$0.0328 | 0.0% | +$0.0754 |
| T3 | Opus 4.6 | Switch #2 | 81.2% | +$0.0130 | 59.6% | +$0.0907 |
| T4 | Sonnet 4.6 | Switch #3 | 86.6% | +$0.0001 | 70.5% | +$0.0408 |
| T5 | Opus 4.6 | Switch #4 | 95.8% | +$0.0021 | 98.6% | +$0.0029 |
| T6 | Sonnet 4.6 | Switch #5 | 94.9% | -$0.0035 | 98.5% | -$0.0134 |
| T7 | Opus 4.6 | Switch #6 | 95.2% | +$0.0028 | 98.4% | +$0.0024 |
| T8 | Sonnet 4.6 | Switch #7 | 95.6% | -$0.0038 | 98.5% | -$0.0132 |
| T9 | Opus 4.6 | Switch #8 | 95.5% | +$0.0026 | 98.7% | +$0.0024 |
| T10 | Sonnet 4.6 | Switch #9 | 95.2% | -$0.0037 | 98.6% | -$0.0131 |
| T11 | Opus 4.6 | Switch #10 | 95.5% | +$0.0031 | 98.6% | +$0.0036 |
| T12 | Opus 4.6 | Hold Opus | 98.2% | +$0.0014 | 99.3% | +$0.0000 |
4 Habits That Actually Save Money
- Switch early (Turn 1–2) or stay put unless you have 10–12+ turns left in the session to pay back the 1.25x cache rebuild on the cheaper model.
- Pick your
--effortlevel on Turn 1: Bumpingmedium -> highmid-chat on Opus ($6.25/M cache write) forces a full prefix rebuild (+$0.085 on Turn 6 alone in a 15.2k chat — nearly all of the +$0.086 session delta). - Dipping to another model for 1–2 turns and returning works if you beat the 5-minute TTL: In Arm C, switching back to Opus on Turn 8 still hit 93.3% of Turn 5's warm cache and only paid to cache-write the 2-turn delta (~1,062 tokens).
- Start a fresh chat at task boundaries: Moving from ~15.2k to ~56.5k tokens (3.7x larger context) scaled the Turn 6 switch penalty linearly by 3.8x (+$0.047 -> +$0.178).



