Supreeth Koundinya writes that Spotify has successfully reduced token consumption for its internal coding agent, Claude Code, by approximately 90% through a model routing approach. By using their "Portal" developer platform and "AiKA Modes," the company directs repetitive or I/O-intensive tasks—such as file reading and basic code generation—to cheaper models like Google's Gemini 2.5 Flash, reserving Anthropic's frontier Claude models for complex reasoning and debugging.
- Routing is facilitated by a plugin called Shunt using PreToolUse hooks to intercept large file reads.
- The system uses ephemeral runtimes via AiKA modes so developers don't have to manage infrastructure or API keys manually.
- To prevent context bloat, Claude Code does not directly consume the output of generated code written by worker models to disk.
- Current limitations include a 30-second invocation limit and potential loss of line-level detail during delegated analysis.