The Code/X ArchiveView on X
Prasenjit Sarkar

@stretchcloud

Spotify's engineering team cut Claude Code token usage by 90% with a two-model routing approach they call Portal. The mechanism is worth understanding because it's not prompt engineering, it's hard blocks at the architecture level.

Two cheaper "assistant" models handle the tasks that don't need the expensive model: opening files, writing repetitive code, boilerplate. The expensive model only touches novel reasoning. Files over 350 lines get blocked from the expensive model entirely, not suggested away from it, blocked.

They tried rules-as-instructions first. It didn't hold. Engineers (and the model) found ways around soft rules. Hard blocks at the routing layer worked where prompt-level guidance failed.

90% token reduction is a big number. The implication is that most of what people use frontier models for in a coding workflow doesn't actually require frontier-level reasoning. Routing to capability level rather than defaulting to the best model available is a legitimate architecture pattern.

Article is worth reading in full.

x.com/undefinedKi/status/20959425064330…

Yarchi @undefinedKi

Spotify just published the internal setup their engineers use with Claude Code, the one that cut token usage by 90 percent. Here is how it works.

The observation behind it: most of what a coding assistant does is not thinking. It opens five files to answer a question about one
Image from the post

Quoted post on X →

724175.9K9.7K