Build1 publisher3 min readPublished
One ternary in Jev's gateway limits it to hinting inside Claude Code
Jev's own gateway benchmark shows routing raised Opus 5 input tokens 61% on a Claude Code feature task, where the gateway can only hint at tools. Any saving depends on the task and on how many tools Claude Code sends the router each turn.
The Engineer · Build desk

What happened
- Line 99 of the gateway's src/adapters/messages.ts selects hint mode whenever thinking or caching is on, and the post says every real Claude Code request has both.
- On the bench's chess-bugfix task, routing cut Sonnet 5's input tokens by 48% and its run time by 25%, with nothing less correct.
- Jev decided 76 to 100% of Codex requests, where the gateway forces the tool, against 34 to 51% of Claude Code requests, where it can only hint.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- constraint Any tool router placed in front of Claude Code hits the same ceiling while thinking and caching stay on, since a suggestion is the only intervention that avoids an API error or a lost cache.
- cost A hint that fits badly is paid for in extra requests and wall-clock time, and on the feature task the cheaper runs included failed ones.
- decision Users whose Claude Code work is mostly feature additions have bench evidence for leaving routing off until their own runs say otherwise.
Anthropic's API forces the hint-only design. According to the Anthropic docs the post cites, forcing a tool with extended thinking on returns an error, and on the newest models a forced tool returns a 400 regardless of thinking [8]. Changing tool_choice invalidates the messages cache. Editing a tool definition invalidates everything [9].
The gateway touches neither. In hint mode it appends a block after everything the client sent, on the client's own blocks, so the cached prefix stays byte identical [7]. The block is a `<system-reminder>` saying a tool-routing model suggests a tool, worded so the model knows it may disagree [7]. Given those constraints, I think this is the correct design. A guard skips the hint entirely when the last block is already a system reminder, and Claude Code appends those itself [10]. Some turns therefore reach the model with no suggestion at all [10].
Jev is TypeSafe's decision model. It returns a choice, a score or a yes-no probability in 70 to 500 ms, at $0.042 per million input tokens [2]. The install is clean: `bin/clients.mjs` sets `ANTHROPIC_BASE_URL` and nothing else, so a Pro or Max login keeps working without an API key [5]. The gateway's README says: "Expect better tool picks on large tool lists, not lower cost or latency." [6] The post counted six videos in five days that called the setup the cheapest agentic coding loop available [1].
The bench, jev-gateway-bench, is 120 sessions at five runs per cell on Claude Code 2.1 [11]. On chess-san, a feature task, Opus 5 with routing on also made 47% more requests and took 83% longer [13]. Sonnet 5 read 16% more input tokens and took 37% longer [14]. The authors' explanation, as the post relays it, is that a hint that does not fit costs a detour instead of being ignored for free [15]. One model solved the feature task five times out of five alone and three out of five with routing on, using half the input tokens [16].
The post's headline says Jev did not make Claude Code cheaper [24]. That holds on the feature task. The bug-fix gains came from the same bench, run inside Claude Code where the gateway can only hint, so hint mode did cut tokens on that task [1].
The router's own input is a separate cost. The gateway re-sends the tool roster on every call, and an open issue covers that behaviour [19]. The author's working setup sent 40 tools and 57,000 prefix tokens [18]. At Jev's rate that is about $0.0024 per turn [2], with roughly 14,000 tokens read for each token answered [3]. A bench footnote records one setup sending 285 tools and about 200,000 tokens with every Claude Code request, against 6 tools and 7,000 tokens clean [20]. The author calls Jev's pricing survivable at those sizes [21].
The evidence is narrow by the author's own account: one benchmark, two task families, five runs per cell, on a chess engine, with proxy counts from one machine and one set of plugins [22]. For the bug-fix column to transfer, a user needs a small roster and work that looks like bug hunts, and the author points to the bench repo for measuring that locally [23].
What to watch
- A fix for the open issue on re-sending the full tool roster every call would shrink the router's input on large plugin setups.
- Bench runs beyond the chess engine's two task families, with more than five runs per cell, would show whether the bug-fix gains transfer.
- A change in Anthropic's rules on forced tools under thinking, or on tool_choice cache invalidation, would let the gateway force tools in Claude Code as it does in Codex.