<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>claude-sonnet-4-5 &#8211; iAIFeed</title>
	<atom:link href="https://www.iaifeed.com/tag/claude-sonnet-4-5/feed" rel="self" type="application/rss+xml" />
	<link>https://www.iaifeed.com</link>
	<description>iAIFeed</description>
	<lastBuildDate>Mon, 21 Sep 2026 12:43:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://www.iaifeed.com/wp-content/uploads/2026/07/cropped-iaifeed1-80x80.png</url>
	<title>claude-sonnet-4-5 &#8211; iAIFeed</title>
	<link>https://www.iaifeed.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Reduce Claude Sonnet 4.5 Token Costs in Agents</title>
		<link>https://www.iaifeed.com/how-to-reduce-claude-sonnet-4-5-token-costs</link>
					<comments>https://www.iaifeed.com/how-to-reduce-claude-sonnet-4-5-token-costs#respond</comments>
		
		<dc:creator><![CDATA[iamltlb]]></dc:creator>
		<pubDate>Mon, 21 Sep 2026 12:43:54 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[claude-sonnet-4-5]]></category>
		<guid isPermaLink="false">https://www.iaifeed.com/how-to-reduce-claude-sonnet-4-5-token-costs</guid>

					<description><![CDATA[Prompt caching, tool-result trimming, and turn caps can slash a Sonnet agent's bill. Here are the numbers and the exact settings.]]></description>
										<content:encoded><![CDATA[<p>Claude Sonnet 4.5 is already the value pick, but an unmanaged agent loop can still cost more than it should. The culprit is almost always repeated context: every turn re-sends the whole conversation and all prior tool results. Fixing that cuts costs by 60-90% on long sessions.</p>
<h2>How does prompt caching help?</h2>
<p>Anthropic&#8217;s prompt caching stores a prefix of the conversation and bills reused tokens at roughly a tenth of the normal input rate. You mark a cache breakpoint after your system prompt and the stable part of the context. On a 30-turn agent session, most turns reuse that prefix, so the bulk of input tokens becomes cache reads instead of full-price tokens.</p>
<h2>How do you trim tool results?</h2>
<p>Tool outputs are the silent budget killer. A single <code>git log</code> or directory listing can be thousands of tokens, and it gets re-sent every subsequent turn unless you manage it.</p>
<ul>
<li>Truncate large outputs before appending them to history.</li>
<li>Summarize long results into a few lines once they are no longer needed.</li>
<li>Drop raw file dumps after the model has acted on them.</li>
</ul>
<p>In one common harness, this alone halved per-session cost.</p>
<h2>What settings bound the bill?</h2>
<p>Three config values do the heavy lifting:</p>
<ol>
<li><code>max_tokens</code> — cap output; Sonnet tends to over-explain, and output is the pricier direction.</li>
<li>Max turns — stop the loop at 15-25 rather than letting it run until it &#8220;feels done.&#8221;</li>
<li>Context window budget — track cumulative tokens and compact history past a threshold.</li>
</ol>
<p>Pair these with the same hybrid routing used elsewhere: keep <a href="https://www.iaifeed.com/ai-tool/minimax-m2">minimax-m2</a> as a cheap workhorse for simple turns and call Sonnet only where quality matters.</p>
<h2>What is a realistic saving?</h2>
<p>An unmanaged 30-turn session on a mid-sized repo can hit 400k-800k input tokens. With caching on the stable prefix and tool-result trimming, the billable fresh input can drop below 100k. On Sonnet&#8217;s input rate, that is the difference between a few dollars and well under a dollar for the same work.</p>
<h2>What do you give up?</h2>
<p>Caching adds a little latency on the first turn and code complexity in your harness. Trimming tool results risks cutting a detail the model later needs — keep the last relevant result intact. Neither change touches model choice, so answer quality on the actual task is unaffected.</p>
<h2>Quick Summary</h2>
<ul>
<li>Prompt caching bills reused prefix tokens at roughly a tenth of input price.</li>
<li>Trim or summarize large tool outputs before appending them.</li>
<li>Cap <code>max_tokens</code>, set 15-25 max turns, compact long history.</li>
<li>A 30-turn session can drop from 400k-800k fresh input tokens to under 100k.</li>
<li>Adds modest harness complexity; task quality stays the same.</li>
</ul>
<p><em>Last updated September 2026.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.iaifeed.com/how-to-reduce-claude-sonnet-4-5-token-costs/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Use Claude Sonnet 4.5 in Your Coding Agent</title>
		<link>https://www.iaifeed.com/how-to-use-claude-sonnet-4-5-in-your-coding-agent</link>
					<comments>https://www.iaifeed.com/how-to-use-claude-sonnet-4-5-in-your-coding-agent#respond</comments>
		
		<dc:creator><![CDATA[iamltlb]]></dc:creator>
		<pubDate>Mon, 21 Sep 2026 12:43:41 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[claude-sonnet-4-5]]></category>
		<guid isPermaLink="false">https://www.iaifeed.com/how-to-use-claude-sonnet-4-5-in-your-coding-agent</guid>

					<description><![CDATA[Claude Sonnet 4.5 is a balanced coding model. Learn how to wire it into an agent, set token budgets, and when to pick it over Opus.]]></description>
										<content:encoded><![CDATA[<p>Claude Sonnet 4.5 is Anthropic&#8217;s mid-tier model tuned for coding and tool use. It sits below Opus on raw reasoning but above it on price-to-performance, which is why it is the default for most coding agents. Plugging it into an existing agent takes one model-string change.</p>
<h2>What is Claude Sonnet 4.5?</h2>
<p>Sonnet 4.5 is a general-purpose model from Anthropic with strong tool-calling and code generation. It supports a large context window, accepts images, and exposes the same messages API as other Claude models. In the Claude lineup it is the pragmatic middle: more capable than Haiku, cheaper than Opus.</p>
<h2>How do you connect it to an agent?</h2>
<p>The wiring is minimal:</p>
<ol>
<li>Take an Anthropic API key and export it as <code>ANTHROPIC_API_KEY</code>.</li>
<li>Point your agent at the model string for Sonnet 4.5.</li>
<li>Define your tools in the standard schema — Sonnet handles parallel tool calls well.</li>
<li>Set a max output token cap to keep responses bounded.</li>
</ol>
<p>Because the API is stable across Claude versions, switching from Haiku or Opus is a one-line edit. Tools like <a href="https://www.iaifeed.com/ai-tool/droid">droid</a> let you swap the backing model in config without reinstalling.</p>
<h2>How does Sonnet 4.5 price against Opus?</h2>
<p>Sonnet costs a fraction of Opus per million tokens — roughly one-fifth on input. On a typical coding task burning 50k tokens, Sonnet runs a few cents while Opus runs closer to twenty. For 90% of day-to-day edits the quality gap does not show up, which makes Sonnet the sensible default and Opus the escalation path.</p>
<h2>When should you still pick Opus?</h2>
<p>Reach for Opus on architecture decisions, subtle concurrency bugs, and large refactors where a wrong plan wastes more than the token premium. A good split: Sonnet writes the change, Opus reviews the plan on high-stakes tasks. This mirrors the hybrid routing that keeps agent costs sane.</p>
<h2>What are the limits?</h2>
<p>Sonnet can over-narrate — it explains more than needed, which inflates output tokens. It also sometimes edits more files than requested unless you scope the task. Both are prompt-fixable: ask for the diff only, and name the target files explicitly.</p>
<h2>Quick Summary</h2>
<ul>
<li>Claude Sonnet 4.5 is Anthropic&#8217;s mid-tier coding model, below Opus on cost.</li>
<li>Connect via the Anthropic API; swapping models is a one-line change.</li>
<li>Costs roughly one-fifth of Opus on input tokens.</li>
<li>Best default for routine edits; escalate to Opus for hard planning.</li>
<li>Scope tasks tightly — Sonnet can over-narrate and over-edit.</li>
</ul>
<p><em>Last updated September 2026.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.iaifeed.com/how-to-use-claude-sonnet-4-5-in-your-coding-agent/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
