Blog · 2026-09-10 · Vynaris Team
Spotify cut Claude reading tokens 90%: at $3/$15, the two-model bill falls 71.7%
Spotify's Portal shunt routes file reads from Sonnet 5 to Gemini 2.5 Flash. At $3/$15, a 20k-token file read costs $0.06 direct vs $0.017 via worker: 71.7% savings. The Sep 1 price increase made delegation more attractive, not less.
Spotify's engineering blog describes a mechanism that routes file reading from Claude Sonnet 5 to Gemini 2.5 Flash, cutting reading tokens 90%. At Sonnet 5's new $3/$15 rate, a 20,000-token file read costs $0.06 direct but only $0.017 via a Gemini worker, a 71.7% cost reduction. The September 1 price increase made the two-model approach more attractive, not less. Prices verified 2026-09-10.
TL;DR
- Spotify's Portal "shunt" plugin intercepts large file reads in Claude Code and delegates them to a cheaper worker model. The blog reports mean input token savings of 90%.
- We model the cost: reading a 20,000-token file directly with Sonnet 5 at $3/$15 costs $0.06 per task. Routing through Gemini 2.5 Flash ($0.30/$2.50 per MTok) and feeding Sonnet 5 only the 2,000-token summary costs $0.017 per task.
- The cost savings are 71.7% at the new rate, up from 62.5% at the old $2/$10 rate. The price increase widened the gap.
- Spotify's own blog admits the worker model "missed a subtle thread-safety bug." The savings are real. The quality tradeoff is also real.
Verdict table
Path What happens Per-task cost Per 1,000 tasks Savings
--------------- -------------------------------------------------------------- ------------- --------------- --------
Direct ($3/$15) Sonnet 5 reads 20k input tokens $0.060 $60.00 baseline
Worker ($3/$15) Gemini reads 20k + summarizes to 2k; Sonnet ingests 2k summary $0.017 $17.00 71.7%
Direct ($2/$10) Sonnet 5 reads 20k input tokens $0.040 $40.00 baseline
Worker ($2/$10) Gemini reads 20k + summarizes to 2k; Sonnet ingests 2k summary $0.015 $15.00 62.5%Sonnet 5: $3/$15 per MTok (input/output). Gemini 2.5 Flash: $0.30/$2.50 per MTok. Source: Anthropic pricing and Google AI pricing, verified 2026-09-10.
The workload model
The Spotify engineering blog describes two modes in Portal by Spotify. The first, "bulk-reader," reads large files and outputs a structured summary. The second, "code-writer," generates boilerplate code that goes straight to disk.
We model the bulk-reader path. A coding agent needs to read a 20,000-token file to answer a question. Two paths:
- Direct: Sonnet 5 reads all 20,000 input tokens itself.
- Worker: Gemini 2.5 Flash reads the 20,000 tokens and produces a 2,000-token summary. Sonnet 5 then ingests the 2,000-token summary as input.
Sonnet 5's final output (the answer to the user) is identical in both paths. It cancels out. We compare only the cost of getting file content into Sonnet 5's context window.
The assumptions are editable in the calculator. Change the file size, summary length, or model rates to match your workload.
Direct path: Sonnet 5 reads the file
At the new $3/$15 rate: 20,000 tokens x $3/MTok = $0.06 per task. Across 1,000 tasks: $60.00.
At the old $2/$10 rate: 20,000 tokens x $2/MTok = $0.04 per task. Across 1,000 tasks: $40.00.
The September 1 price increase raised this cost 50%. No mechanism change, no workload change. The same file read costs $0.02 more per task.
Worker path: Gemini reads, Sonnet ingests
The worker path has two legs.
Leg A: Gemini 2.5 Flash reads 20,000 input tokens and produces 2,000 output tokens.
20,000 x $0.30/MTok + 2,000 x $2.50/MTok = $0.006 + $0.005 = $0.011 per task
Leg B: Sonnet 5 ingests the 2,000-token summary as input. No output on this leg.
At $3/$15: 2,000 x $3/MTok = $0.006 per task.
At $2/$10: 2,000 x $2/MTok = $0.004 per task.
Total worker cost: $0.011 + $0.006 = $0.017 per task at the new rate. $0.011 + $0.004 = $0.015 at the old rate.
The Gemini leg is unchanged by the Sonnet 5 price increase. Only the summary-ingestion leg rose.
Why the savings percentage went up
At the old $2/$10 rate, the worker path saved 62.5%: ($0.040 - $0.015) / $0.040 = 62.5%.
At the new $3/$15 rate, the worker path saves 71.7%: ($0.060 - $0.017) / $0.060 = 71.7%.
The direct cost rose 50% ($0.040 to $0.060). The worker cost rose only 13.3% ($0.015 to $0.017). The gap widened because the Gemini leg, which dominates the worker cost, did not change.
This is the counterintuitive result: a price increase on the expensive model makes the delegation pattern more attractive, not less. The more Sonnet 5 costs per token, the more you save by not feeding it raw tokens.

Sensitivity: file size matters
The savings depend heavily on file size. A 5,000-token file barely justifies the worker overhead. A 100,000-token file makes it obvious.
File tokens Direct ($3/$15) Worker ($3/$15) Savings Percent
----------- --------------- --------------- ------- -------
5,000 $0.015 $0.0125 $0.0025 16.7%
10,000 $0.030 $0.014 $0.016 53.3%
20,000 $0.060 $0.017 $0.043 71.7%
50,000 $0.150 $0.026 $0.124 82.7%
100,000 $0.300 $0.041 $0.259 86.3%The crossover is around 10,000 tokens. Below that, the fixed cost of the Gemini summary (2,000 output tokens at $2.50/MTok = $0.005) eats most of the savings. Above that, the 10x input price ratio between Sonnet 5 ($3/MTok) and Gemini 2.5 Flash ($0.30/MTok) dominates.
Spotify's shunt plugin defaults to a 350-line threshold. Files below that pass through to Claude directly. The cost math supports this: small files are not worth delegating.
The code-writer scenario
Spotify's second mode, "code-writer," generates boilerplate code from reference files. The key difference: the code goes straight to disk. Sonnet 5 never sees it.
We model a 10,000-token reference input with 5,000-token code output.
Direct: Sonnet 5 reads 10k input and generates 5k output.
10,000 x $3/MTok + 5,000 x $15/MTok = $0.03 + $0.075 = $0.105 per task
Worker: Gemini 2.5 Flash reads 10k input and generates 5k output. Sonnet 5 cost: $0.
10,000 x $0.30/MTok + 5,000 x $2.50/MTok = $0.003 + $0.0125 = $0.0155 per task
Savings: 85.2%. Per 1,000 tasks: $105.00 direct vs $15.50 worker.
The code-writer path saves more than the bulk-reader path because it eliminates Sonnet 5's output token cost entirely. Output tokens at $15/MTok are 6x more expensive than Gemini's $2.50/MTok. Cutting them out of the Sonnet 5 bill is the biggest win.
Honest tradeoff: the worker model misses things
Spotify's blog is candid about the quality gap. The worker model "found surface-level patterns but missed a subtle thread-safety bug in my testing. Claude spotted it in seconds once given the right context."
The HN thread (274 points, 174 comments) pushes harder. One commenter writes: "During planning, the big model already reads the relevant files in context, while giving a smaller model a slice of work itself requires the big model to reason about the task distribution, review, etc. So do you really save on tokens?" Another calls it "just offshoring but for models."
The savings calculation assumes the summary is sufficient. When it is not, Sonnet 5 re-reads the file directly, and you pay both paths. The net savings depend on the fraction of tasks where the summary is enough. Spotify reports 90% token reduction across their test scenarios. Their benchmark does not measure accuracy against a held-out test suite. The 90% is a token count, not a quality-adjusted metric.
This is not an argument against delegation. It is an argument for measuring where the summary is sufficient and where it is not, then routing accordingly. A model routing policy that delegates blindly will hit the quality gap. One that delegates the right tasks will capture the savings.
Our when not to use an LLM router analysis covers the same principle from the routing side: the savings are real only when the cheaper model passes the quality bar for that specific task.
How this compares to prompt caching
Prompt caching and the worker pattern solve different problems. Caching reduces the cost of re-reading the same tokens. The worker pattern reduces the cost of reading them the first time.
They compose. Cache the Gemini summary, not the raw file. A cached 2,000-token summary read costs $0.0006 at Sonnet 5's $0.30/MTok cache-read rate, compared to $0.006 uncached. The cache-read rate at the new $3/$15 pricing is $0.30/MTok, up from $0.20/MTok.
The worker pattern and caching are not substitutes. Use both.
FAQ
Does this require Spotify's Portal platform?
No. The pattern is a Claude Code plugin called "shunt" that uses PreToolUse hooks. The hooks intercept file reads above a threshold and redirect to a worker model. Any coding agent that supports tool-call interception can implement the same pattern. The Spotify blog describes the mechanism in full.
What is the break-even file size?
At the current $3/$15 rate with a 2,000-token summary, the worker path saves 16.7% at 5,000 tokens, 53.3% at 10,000 tokens, and 71.7% at 20,000 tokens. The crossover where delegation is clearly worthwhile is around 10,000 tokens. Below that, the fixed cost of the Gemini summary dominates.
Did Spotify publish their actual spending?
No. The blog describes the mechanism and reports token reduction. Our cost model uses public pricing from Anthropic and Google, not Spotify's internal data.
Can I use a different worker model?
Yes. The Spotify blog uses Gemini 2.5 Flash, but the mode configuration accepts any model. A cheaper worker like Haiku 4.5 at $1/$5 per MTok would cost more than Gemini 2.5 Flash ($0.30/$2.50) for this workload. The worker should be the cheapest model that produces a sufficient summary.
How does this interact with the coding agent cost-per-task leaderboard?
Our coding agent cost-per-task leaderboard showed Claude Code at $1.47 per task on Kimi K3 list pricing. That figure used Sonnet 5 at $2/$10. At $3/$15, every Claude Code task that touches Sonnet 5 costs 50% more in token fees. The delegation pattern is one way to offset that increase without switching agents.