AIToday
Large Language ModelsAI Coding AssistantsGIGAZINE AIPublished: Dec 3, 2026, 22:01 JST

OpenRouter实测:AI agent cost down about 92% with 4 fixes

Send on LINE
OpenRouter实测:AI agent cost down about 92% with 4 fixes

3 Key Points

  1. What happened

    OpenRouter built a fictional coding history of about 1 million characters (260,000 tokens), sent 40 requests per session to GPT-6 Luna, and found fixing the prompt opening plus trimming tool results when adding them to history cut costs by about 92% versus changing the opening each time.

  2. Why it matters

    The same token usage cost about 7.8× more when the prompt opening changed each request (0% cache use) than when it was fixed (95% cache use), so where variable data like timestamps sits in a prompt appears to directly drive agent bills.

WHO IT HITSTeams running AI agents (coding assistants and other multi-step workflow tools) can cut per-session costs by reordering prompts and trimming tool output; OpenRouter advises first checking cache use on a second request.

Ask AI

Ask the AI about this article. Questions and answers are published on this page

FAQ
What is prompt caching and why does it matter for cost?
It reuses prior processing for the identical leading part of a prompt, charging less than normal processing. OpenRouter found 95% cache use when the opening was fixed versus 0% when a timestamp at the top changed each request.
How did OpenRouter trim long tool results?
It kept the first and last 800 characters of long results, omitted the middle, and noted how many characters were omitted. That cut input tokens by 36% while keeping 95% cache use.
What went wrong when old history was summarized?
Re-summarizing old summaries together with new history lost key information and answered only 1 of 4 questions correctly. OpenRouter recommends keeping existing summaries and adding new ones.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Related Articles

Next articleAnthropic, OpenAI join push for post-quantum encryption