SShortSingh.
Back to feed

Your LLM Bill Jumped After You Added Context: Find the Cache Miss Before You Downgrade the Model

0
·2 views

If your LLM API spend climbed after you added retrieval, a longer system prompt, or tool definitions, the cause is almost always input tokens being reprocessed at full price on every request — not the model you picked. Check the cache fields in the response usage object first: if cached reads are zero across repeated requests that share a prefix, you have a bug, not a pricing problem. Fixing prefix stability and breakpoint placement is free; downgrading the model costs you quality. The first thing to do is stop reasoning about the bill and start logging per-request token accounting. On the Ant

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

GTM Skills: เมื่อทักษะขายกลายเป็นไฟล์ที่ AI agent ติดตั้งได้เอง

GTM Skills: เมื่อทักษะขายกลายเป็นไฟล์ที่ AI agent ติดตั้งได้เอง โดย Nokka (นก-กา) | 3 ตุลาคม 2569 ถ้าคุณเคยรู้สึกว่าทำงานหาลูกค้าแล้วต้องเปิดเครื่องมือใหม่ทุกครั้งที่งานเปลี่ยนโหมด วันนี้มีของที่อาจทำให้คุณต้องคิดใหม่ [4] GTM Skills คือชุดทักษะสำเร็จรูปสำหรับงานขายและหาลูกค้าแบบ B2B ที่แพ็กมาเป็นไฟล์ข้อความธรรมดา แล้วให้ AI agent ของคุณเรียกใช้ได้เลย ไม่ต้องต่อ API เอง ไม่ต้องจ้างเอเจนซี [1] ผมอ่านทั้ง repo ทั้งหน้าคู่มือ แล้วพบว่าของจริงน่าสนใจกว่าที่คำโปรยบอก แต่ก็มีข้อควรระวังที่คนเขียนคำโปรยไม่ได้เล่า ภาพแนวคิด คือเครื่องมือที่จัดเป็นชุดพร้อมหยิบใช้ตามงาน แทนการต้องหาซื้อใหม่ทุกครั้งที่งาน

0
ProgrammingDEV Community ·

Sprint & Stamina | UE5 Devlog

This devlog showcases my Blueprint-based sprint and stamina system and its integration with the player’s health and thirst. Hydration decreases at a normal rate while walking. Sprinting consumes stamina and accelerates hydration loss, giving faster movement an additional resource cost. Once stamina is depleted, the extra hydration drain from sprinting stops, while the normal drain continues. If hydration reaches zero, the player begins losing health.

0
ProgrammingDEV Community ·

x402 Foundation Members: The Full 40-Member Roster (And the Honest Caveat)

The x402 Foundation — the Linux Foundation body stewarding the x402 machine-payment protocol — has 40 member organizations as of its July 14, 2026 operational launch. Every article covers the announcement; nobody published the full roster as infrastructure intelligence. So here it is: all 40, by tier, with what each heavy hitter structurally adds. April 2, 2026: intent to launch at the MCP Dev Summit ("4/02 Day"). Coinbase contributes x402 to the Linux Foundation.

0
ProgrammingDEV Community ·

A SwiftUI search adapter needs its own request ownership

Robin Winters · October 3, 2026 · Native iOS engineering and fitness technology This standalone teaching example and article were prepared with coding-assistant support. The events are synthetic. The code is separate from ShowFlex, whose shipped iPhone product is available on the App Store. A search controller can correctly reject stale requests while its view adapter still publishes the wrong state. The useful question is not only whether the controller owns its result: it is whether the task waiting for that result still owns the screen.