Build1 publisher3 min readPublished
Gemini File Search's 'pay once at indexing' pricing still billed LiveReview for reasoning on every query
LiveReview's Maneshwar says Gemini File Search cost over 50 cents a review run because a reasoning model performed each search. A local index and a cheaper model brought runs down to 4 cents.
The Engineer · Build desk

What happened
- Gemini's File Search pricing page says storage and query-time embeddings are free, and customers pay once, at indexing time.
- According to LiveReview's Maneshwar, the search is a tool the model calls mid-answer, so retrieved chunks enter its context as input tokens and it reasons over them.
- One retrieval call on Gemini 3.5 Flash produced 9,529 output tokens, and 8,493 of them were the model thinking.
- After moving retrieval to a local Chroma index and model calls to DeepSeek V4 Flash, the post reports runs at 4 cents each.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- cost Teams cannot forecast File Search spend from the indexing bill, because each query's cost grows with how long the calling model thinks.
- decision A pipeline that searches once per draft pays for retrieval reasoning once per draft, so collapsing that fan-out is the first saving to test before any vendor change.
- constraint Because the 4-cent run bundles a retrieval swap with a model swap, other teams cannot size the benefit of owning retrieval from this post alone.
- cost Owning retrieval means operating a Python service and an embedding model beside the main binary, a cost the per-run figure leaves out.
At the $9.00 rate, that call's 9,529 output tokens cost about 8.6 cents [8][9][2]. The 8,493 thinking tokens were 89 percent of the output and about 7.6 cents of the charge [1][2]. The retrieved chunks are billed on top of that, as ordinary input tokens [7]. "We paid a reasoning model to reason about which paragraphs to copy," Maneshwar wrote [20].
The first fix needed no new vendor. The draft step ran its own search, so three drafts meant three searches [10]. Moving search out so one result set fed every draft took a run from about $0.70 to about $0.12, a factor of about 5.8 [10][3]. I'd look for this fan-out in any agent pipeline before pricing a migration. The post's baselines drift a little: the headline says more than 50 cents a run, the body says 50 cents, and the split fix started from about $0.70 [2][3][10].
The replacement takes the model out of retrieval. Chunks sit in a local Chroma store, embedded with Qwen3-Embedding-0.6B [11]. Queries run dense vectors and BM25 side by side, and Reciprocal Rank Fusion merges the two rankings [11]. "Retrieval does not need a brain," Maneshwar wrote [19].
Every model call moved at the same time, to DeepSeek V4 Flash on Atlas Cloud at $0.14 per million input tokens and $0.28 per million output [12]. On output alone, DeepSeek's rate is about 32 times lower than Gemini's $9.00 [4]. The author puts the per-token saving at roughly ten times [12]. The drop to 4 cents is 12.5 times below the headline's 50 cents, and it comes from both changes together [2][5]. The post's headline figure does not split the saving between them.
The retrieval service is Python. It runs as a child process of the Go binary on a port nothing else uses, starting with make run and dying with it [13]. The alternative was exporting the embedder to ONNX and linking a Go runtime through cgo, with driver, CUDA and cuDNN versions matched exactly, because Go has no mature CUDA path [14]. For a team of five, I'd accept the extra process too [5]. Maneshwar wrote that adding a process boundary was cheaper than taking on a whole new class of works-on-my-machine problems [15].
The best engineering in the post is the corpus prep. The 71 markdown files are mostly books converted from PDF [16]. The cleaner strips converter footers, page-number lines, picture-text blocks and hyphenated line breaks [17]. Running headers go by one rule: a short line that appears five or more times in one file is page furniture [17]. Chunks run about 300 words with a 450-word cap, split on sentence boundaries [18]. Two sentences carry into the next chunk, so a quote that straddles a boundary survives in at least one chunk [18].
The 50-to-4 result transfers to a team whose hosted search is called by a reasoning model that bills its thinking as output [7][8]. It also assumes a pipeline that repeats searches the way this draft step did [10]. The local half assumes a corpus near this one's size, 71 files, served by retrieval parts the author says run on a laptop [16][21].
What to watch
- A per-stage cost breakdown from LiveReview separating the local-retrieval saving from the DeepSeek V4 Flash switch.
- Retrieval-quality comparisons between the local Chroma hybrid stack and File Search, since a 4-cent run matters less if review precedent gets worse.
- Whether Gemini's File Search pricing page starts stating the thinking-token cost that a search call incurs.