<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Owen</title>
    <description>The latest articles on DEV Community by Owen (@owen_fox).</description>
    <link>https://dev.to/owen_fox</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3893304%2Fb8cec06b-7789-423e-a8d0-386db7f00620.png</url>
      <title>DEV Community: Owen</title>
      <link>https://dev.to/owen_fox</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/owen_fox"/>
    <language>en</language>
    <item>
      <title>Claude Code fallbackModel: 3-Tier Failover Setup (2026)</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Wed, 15 Jul 2026 08:28:04 +0000</pubDate>
      <link>https://dev.to/owen_fox/claude-code-fallbackmodel-3-tier-failover-setup-2026-ao9</link>
      <guid>https://dev.to/owen_fox/claude-code-fallbackmodel-3-tier-failover-setup-2026-ao9</guid>
      <description>&lt;p&gt;Claude Code fallbackModel retries up to 3 models on a 529 overload, not on 429. Set it up in 4 steps (settings.json + CLI) and know when a gateway wins.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set Up 3-Tier Failover in 4 Steps
&lt;/h2&gt;

&lt;p&gt;When Anthropic returns a 529 &lt;code&gt;overloaded_error&lt;/code&gt;, an unconfigured Claude Code session retries the same model, then hands you the error. A fallback chain turns that dead end into a downshift: overloaded on Opus, retry on Sonnet, and if that is also unavailable, Haiku.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you can do&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Keep a turn alive through a 529 overload by having Claude Code try up to three backup models in order&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time required&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;About 5 minutes&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you need&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Claude Code v2.1.197+ (for the Sonnet 5 alias), account access to the models you list, and edit access to a &lt;code&gt;settings.json&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The whole configuration is one array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"opus"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"fallbackModel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"sonnet"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"haiku"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a three-tier chain: &lt;code&gt;opus&lt;/code&gt; is the primary, &lt;code&gt;sonnet&lt;/code&gt; and &lt;code&gt;haiku&lt;/code&gt; are the fallbacks. The rest of this guide is about the parts that are not obvious from the array: which errors actually trigger it, why a 429 does not, how the chain behaves across a team, and where a single-account chain stops helping.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Can Do After This Setup (And What You Can't)
&lt;/h2&gt;

&lt;p&gt;A fallback chain is a narrow tool. It is worth being precise about its edges before you build one, because the failure it fixes looks a lot like two failures it does not.&lt;/p&gt;

&lt;p&gt;Here is what a fallback chain does for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Survives a transient Anthropic overload (&lt;code&gt;529 overloaded_error&lt;/code&gt;) without losing the turn.&lt;/li&gt;
&lt;li&gt;Keeps working when a specific model is unavailable, for example a model pinned in settings that has since been retired.&lt;/li&gt;
&lt;li&gt;Downshifts capability deliberately, so a hard task that starts on Opus finishes on Sonnet rather than not at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is what it will not do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get you past a 429 rate limit or a usage cap. Those are quota problems, and every model in the chain draws from the same account quota.&lt;/li&gt;
&lt;li&gt;Fail over to a different provider. Chain elements resolve to Claude models on one account, so a total Anthropic outage takes the chain down with it.&lt;/li&gt;
&lt;li&gt;Change your primary model permanently. A switch is per-turn, and the next message starts on your primary again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your recurring pain is "usage limit reached" rather than "overloaded," a fallback chain is the wrong fix. See the separate guide on &lt;a href="https://ofox.ai/blog/claude-code-rate-limit-reached-error-fix-2026/" rel="noopener noreferrer"&gt;rate limit reached in Claude Code&lt;/a&gt;, and for the API-level version of the overload itself, &lt;a href="https://ofox.ai/blog/claude-api-error-529-overloaded-fix-2026/" rel="noopener noreferrer"&gt;Claude API error 529&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decision Frame: When to Use This Setup (and When NOT)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;When to use it&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You run Claude Code in an unattended or scripted context (CI, a long agent run, an overnight task) where a mid-turn 529 would otherwise abort the whole job.&lt;/li&gt;
&lt;li&gt;You are on a paid API or high tier where overloads, not quota, are your usual interruption.&lt;/li&gt;
&lt;li&gt;You can tolerate a quality downshift for the rest of a turn in exchange for that turn completing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When NOT to use it&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your interruptions are 429s or "usage limit reached." A chain does nothing here; fix quota or caching instead (&lt;a href="https://ofox.ai/blog/claude-code-token-optimization-2026/" rel="noopener noreferrer"&gt;token optimization&lt;/a&gt; is the lever).&lt;/li&gt;
&lt;li&gt;You need every turn on a specific model for reproducibility. A silent downshift to Haiku mid-run can change output quality in ways a later step depends on.&lt;/li&gt;
&lt;li&gt;You need provider-level resilience. One account cannot fail over to itself; that needs a gateway (covered below).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stop rule&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If all you want is a single automatic backup on overload, add one entry and stop: &lt;code&gt;"fallbackModel": ["sonnet"]&lt;/code&gt;. The three-tier chain matters only when you expect Sonnet to be under load at the same time as Opus, which mostly happens during a broad platform incident.&lt;/p&gt;

&lt;h2&gt;
  
  
  System Requirements
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Requirement&lt;/th&gt;
&lt;th&gt;Detail&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code version&lt;/td&gt;
&lt;td&gt;v2.1.197+ so the &lt;code&gt;sonnet&lt;/code&gt; alias resolves to Sonnet 5; v2.1.154+ for Opus 4.8. Run &lt;code&gt;claude update&lt;/code&gt; if unsure.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model access&lt;/td&gt;
&lt;td&gt;Every model you list must be reachable on your account. An element you cannot reach is skipped, not fatal, but a chain of unreachable models fails like no chain at all.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Settings location&lt;/td&gt;
&lt;td&gt;A &lt;code&gt;settings.json&lt;/code&gt; you can edit: &lt;code&gt;~/.claude/settings.json&lt;/code&gt; (user) or &lt;code&gt;.claude/settings.json&lt;/code&gt; (project).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provider&lt;/td&gt;
&lt;td&gt;The examples assume the Anthropic API. On Bedrock, Google Cloud, or Foundry, aliases resolve to different versions and you may need full deployment IDs.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The three aliases and what they resolve to on the Anthropic API today:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Alias&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;API ID&lt;/th&gt;
&lt;th&gt;Input / Output (per MTok)&lt;/th&gt;
&lt;th&gt;Context&lt;/th&gt;
&lt;th&gt;Effort default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;opus&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Opus 4.8&lt;/td&gt;
&lt;td&gt;&lt;code&gt;claude-opus-4-8&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$5 / $25&lt;/td&gt;
&lt;td&gt;1M&lt;/td&gt;
&lt;td&gt;high&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sonnet&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sonnet 5&lt;/td&gt;
&lt;td&gt;&lt;code&gt;claude-sonnet-5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$3 / $15&lt;/td&gt;
&lt;td&gt;1M&lt;/td&gt;
&lt;td&gt;high&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;haiku&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Haiku 4.5&lt;/td&gt;
&lt;td&gt;&lt;code&gt;claude-haiku-4-5-20251001&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$1 / $5&lt;/td&gt;
&lt;td&gt;200K&lt;/td&gt;
&lt;td&gt;(no effort control)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two details from that table shape a sensible chain. Sonnet 5 carries introductory pricing of $2 / $10 per MTok through August 31, 2026, so the middle tier is cheaper than list right now. And Haiku 4.5 has a 200K context window, not the 1M that Opus and Sonnet carry, so a long session that overflows 200K will not fit on the Haiku tier. Order your chain with that in mind: Haiku is a last resort for capacity reasons, not just quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-Step Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Confirm your primary model and version
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude &lt;span class="nt"&gt;--version&lt;/span&gt;
claude   &lt;span class="c"&gt;# then run /status inside the session&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;/status&lt;/code&gt; shows the active model. If &lt;code&gt;opus&lt;/code&gt; is not resolving to Opus 4.8, or &lt;code&gt;sonnet&lt;/code&gt; is not Sonnet 5, run &lt;code&gt;claude update&lt;/code&gt; first. Expected result: a version at or above 2.1.197 and a recognizable primary model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Test a chain for one session with the flag
&lt;/h3&gt;

&lt;p&gt;Before you persist anything, try the chain with the CLI flag. It accepts a comma-separated list and overrides any saved setting, which makes it the safest way to experiment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude &lt;span class="nt"&gt;--model&lt;/span&gt; opus &lt;span class="nt"&gt;--fallback-model&lt;/span&gt; sonnet,haiku
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result: the session starts on Opus. You will not see the fallbacks unless an overload actually occurs, at which point Claude Code prints a notice naming the model it switched to.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Persist the chain in settings.json
&lt;/h3&gt;

&lt;p&gt;Once the flag behaves, move it into settings so every session inherits it. Use either aliases or full model IDs; full IDs pin a version and survive alias changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"opus"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"fallbackModel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"claude-sonnet-5"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"claude-haiku-4-5"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result: new sessions start on Opus with a two-model fallback chain, no flag needed. The &lt;code&gt;--fallback-model&lt;/code&gt; flag still wins for any session you launch with it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Verify the trigger conditions, not the happy path
&lt;/h3&gt;

&lt;p&gt;You cannot manufacture a real 529 on demand, so verify the parts you can reason about instead of waiting for an outage. Confirm each element resolves to a model you can reach, and confirm you understand what will &lt;em&gt;not&lt;/em&gt; trigger it. Do not rely on an error to tell you the chain is read: Claude Code does not validate &lt;code&gt;fallbackModel&lt;/code&gt; at startup (verified on v2.1.208), so a malformed value is silently ignored rather than throwing. That last point, what will &lt;em&gt;not&lt;/em&gt; trigger it, is where most misconfigurations hide, so it gets its own section.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Triggers a Fallback (and What Doesn't)
&lt;/h2&gt;

&lt;p&gt;This is the table to internalize. A fallback fires on availability failures and stays silent on everything else.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;HTTP&lt;/th&gt;
&lt;th&gt;Triggers fallback?&lt;/th&gt;
&lt;th&gt;What actually happens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Overloaded&lt;/td&gt;
&lt;td&gt;529 &lt;code&gt;overloaded_error&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Switches to the next model in the chain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model unavailable&lt;/td&gt;
&lt;td&gt;varies&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Skips to the next reachable element&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Other non-retryable server error&lt;/td&gt;
&lt;td&gt;5xx&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Switches to the next model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rate limit&lt;/td&gt;
&lt;td&gt;429&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Normal retry with backoff, then surfaced&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authentication&lt;/td&gt;
&lt;td&gt;401&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Surfaced as an auth error&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Billing&lt;/td&gt;
&lt;td&gt;402/403&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Surfaced as a billing error&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Request too large&lt;/td&gt;
&lt;td&gt;413&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Surfaced as a size error&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transport / network&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Normal retry, then surfaced&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The 429 row is the one that trips people. A rate limit means you have exhausted a quota, and every model in your chain bills against the same account, so switching from Opus to Haiku does not create headroom. Claude Code knows this and refuses to burn a fallback on it. If your logs show fallbacks that never fire during an incident, check whether the incident is actually a 429.&lt;/p&gt;

&lt;p&gt;Here is the same logic as a flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowchart TD
    A[Model request] --&amp;gt; B{Response}
    B --&amp;gt;|529 / unavailable / non-retryable 5xx| C{More models in chain?}
    B --&amp;gt;|429 / auth / billing / size| D[Normal retry, then surface error]
    B --&amp;gt;|success| E[Return result for this turn]
    C --&amp;gt;|yes| F[Switch to next model, show notice]
    C --&amp;gt;|no| D
    F --&amp;gt; A
    E --&amp;gt; G[Next message tries primary first again]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Choosing Your Chain Order
&lt;/h2&gt;

&lt;p&gt;The order of the array is the order Claude Code tries, so the array is a priority list, not a set. Two defaults cover most cases, depending on what you optimize for.&lt;/p&gt;

&lt;p&gt;Capability-first (&lt;code&gt;["sonnet", "haiku"]&lt;/code&gt; under an &lt;code&gt;opus&lt;/code&gt; primary) keeps quality as high as availability allows and only drops to Haiku when both larger models are overloaded at once. Use it for interactive work where a downshift is a genuine last resort.&lt;/p&gt;

&lt;p&gt;Cost-first (&lt;code&gt;sonnet&lt;/code&gt; primary, &lt;code&gt;["haiku"]&lt;/code&gt; fallback) never reaches for Opus at all. Use it in CI and agent loops where throughput and predictable spend matter more than the ceiling. The &lt;a href="https://ofox.ai/blog/claude-code-hybrid-routing-pattern-2026/" rel="noopener noreferrer"&gt;hybrid routing&lt;/a&gt; argument applies here: most turns do not need Opus, so making it the primary just to have a tall chain wastes money on the common case.&lt;/p&gt;

&lt;p&gt;One constraint outranks both preferences, and it is easy to miss: context window. Haiku 4.5 carries a 200K window against the 1M that Opus 4.8 and Sonnet 5 provide. A session that has already grown past 200K cannot land on the Haiku tier at all, so on long-context work Haiku is effectively absent from the chain no matter where you place it. If your sessions routinely run large, keep the chain on the 1M-window tiers and accept that a simultaneous Opus-and-Sonnet outage will fail the turn rather than silently truncate context.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Switch Looks Like
&lt;/h2&gt;

&lt;p&gt;A fallback is never silent. When one fires, Claude Code prints a notice in the transcript naming the model it moved to. Because the switch is scoped to the turn, you see that notice again on the next overload rather than a session that quietly settles onto Haiku. Misconfiguration, by contrast, is silent: a malformed &lt;code&gt;fallbackModel&lt;/code&gt; value is ignored without a warning (verified on v2.1.208), so a broken chain looks exactly like a working one until an overload finds the gap. To confirm a chain is actually live, do not look for a startup error; audit it from the &lt;code&gt;modelUsage&lt;/code&gt; field of a JSON run, as described next.&lt;/p&gt;

&lt;p&gt;In non-interactive runs (&lt;code&gt;-p&lt;/code&gt; / &lt;code&gt;--print&lt;/code&gt;) that emit JSON, the plain-text notice is suppressed, so read the model that actually answered from the &lt;code&gt;modelUsage&lt;/code&gt; field of the result message rather than assuming the primary handled the turn. That is the reliable way to audit, after the fact, how often a chain caught something and which tier absorbed the load. If a chain never shows a catch across a real incident window, re-check whether the incident was a 429, which no chain covers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Errors During Setup (and Fixes)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Cause&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Chain never fires during an outage&lt;/td&gt;
&lt;td&gt;The outage is a 429, not a 529&lt;/td&gt;
&lt;td&gt;fallbackModel does not cover rate limits; handle quota separately&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Your global chain is silently gone&lt;/td&gt;
&lt;td&gt;A project &lt;code&gt;.claude/settings.json&lt;/code&gt; also defines &lt;code&gt;fallbackModel&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;fallbackModel does not merge across files; the highest-precedence file supplies the entire chain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A listed model is skipped&lt;/td&gt;
&lt;td&gt;It is retired, unreachable, or excluded by &lt;code&gt;availableModels&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Replace retired IDs; an allowlisted-out element is dropped when the chain is read&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Only three of your four models run&lt;/td&gt;
&lt;td&gt;Chains are capped at three after de-duplication&lt;/td&gt;
&lt;td&gt;Trim the list; extra entries past three are ignored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A typo'd chain element never fires, with no error&lt;/td&gt;
&lt;td&gt;Typos in &lt;code&gt;fallbackModel&lt;/code&gt; elements are silently skipped when the chain is read&lt;/td&gt;
&lt;td&gt;Double-check spelling yourself; use a valid alias (&lt;code&gt;opus&lt;/code&gt;/&lt;code&gt;sonnet&lt;/code&gt;/&lt;code&gt;haiku&lt;/code&gt;) or a &lt;code&gt;claude-&lt;/code&gt; prefixed ID. No startup error will catch this&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fallback ignored in a scripted run&lt;/td&gt;
&lt;td&gt;Running non-interactively where a flagged request just ends the turn&lt;/td&gt;
&lt;td&gt;This is the Fable 5 classifier path, not fallbackModel; see the disambiguation below&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The no-merge behavior deserves emphasis because it is the opposite of how most array settings work. If you tuned a careful three-tier chain in your user settings and a repo ships a &lt;code&gt;.claude/settings.json&lt;/code&gt; with its own single-model &lt;code&gt;fallbackModel&lt;/code&gt;, the repo wins entirely and your chain is dropped with no warning. Precedence runs managed settings, then command-line flags, then project-local, then project, then user. Put the chain you actually want in the highest-precedence file that any given session will read.&lt;/p&gt;

&lt;h2&gt;
  
  
  Team / Multi-Developer Configuration
&lt;/h2&gt;

&lt;p&gt;For one developer, &lt;code&gt;fallbackModel&lt;/code&gt; in &lt;code&gt;~/.claude/settings.json&lt;/code&gt; is enough. Across a team, the interesting question is who owns the chain and whether individuals can override it.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Goal&lt;/th&gt;
&lt;th&gt;Where to put fallbackModel&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Personal default&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;~/.claude/settings.json&lt;/code&gt; (user)&lt;/td&gt;
&lt;td&gt;Lowest precedence; any project file overrides it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Per-repo default&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.claude/settings.json&lt;/code&gt; (project, committed)&lt;/td&gt;
&lt;td&gt;Overrides user settings for anyone working in the repo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local tweak&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/settings.local.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Overrides project for one machine, usually gitignored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enforced fleet-wide&lt;/td&gt;
&lt;td&gt;managed settings&lt;/td&gt;
&lt;td&gt;Highest precedence; individuals cannot override&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two team-specific interactions matter. First, if you also use &lt;code&gt;availableModels&lt;/code&gt; to restrict which models developers may run, any fallback element outside that allowlist is dropped when the chain is read, so an enforced chain and an allowlist have to agree. Second, because fallback chains do not merge, a committed project chain fully replaces each developer's personal one inside that repo. That is usually what you want for CI and shared agents, but it means a developer who tuned a personal chain loses it silently while working in the repo. Document the project chain so nobody debugs a "missing" fallback that was overridden by design.&lt;/p&gt;

&lt;p&gt;A reasonable committed project chain for a team that runs agents in CI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sonnet"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"fallbackModel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"haiku"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"availableModels"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"sonnet"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"haiku"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That keeps CI on the cheaper Sonnet tier, falls back to Haiku on overload, and forbids anyone from quietly switching a CI job to Opus.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced: Cross-Provider Failover via a Gateway
&lt;/h2&gt;

&lt;p&gt;A fallback chain has a hard ceiling: every model in it lives on the same Anthropic account. When Anthropic itself has a broad incident, all three tiers are overloaded at once, and there is nothing left in the chain to try. The March 18, 2026 outage that ran past three hours is the shape of failure a same-account chain cannot cover.&lt;/p&gt;

&lt;p&gt;Provider-level resilience needs a layer above Claude Code. Point Claude Code at a gateway with &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt;, and the gateway (rather than your one account) decides where a request lands. &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; changes where requests go, not which model answers, so a &lt;code&gt;fallbackModel&lt;/code&gt; chain still works underneath it for model-level failover, while the gateway adds provider-level failover on top.&lt;/p&gt;

&lt;p&gt;An aggregation gateway such as &lt;a href="https://ofox.ai" rel="noopener noreferrer"&gt;ofox&lt;/a&gt; exposes one OpenAI- and Anthropic-compatible endpoint that fronts many providers, so a chain can cross from a Claude model to a non-Claude one when Anthropic as a whole is unavailable, which a native &lt;code&gt;fallbackModel&lt;/code&gt; chain physically cannot do. The trade-off is that you are now trusting a second hop, and you configure routing at the gateway instead of in &lt;code&gt;settings.json&lt;/code&gt;. For the Claude Code side of that setup, see the &lt;a href="https://ofox.ai/blog/claude-code-ofoxai-configuration-guide-2026/" rel="noopener noreferrer"&gt;Claude Code + ofox configuration guide&lt;/a&gt;; for the cost-driven version of the same routing idea, see &lt;a href="https://ofox.ai/blog/claude-code-hybrid-routing-pattern-2026/" rel="noopener noreferrer"&gt;hybrid model routing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One disambiguation before the alternatives. Claude Code also has a feature literally called "automatic model fallback," and it is not this one. That mechanism is specific to Fable 5: when a safety classifier flags a request (most often cybersecurity or biology work), Claude Code reruns it on Opus and shows a notice. It has nothing to do with overloads or the &lt;code&gt;fallbackModel&lt;/code&gt; chain. If you see fallbacks on a Fable 5 session that you did not configure, that is the classifier. Running &lt;code&gt;claude --safe-mode&lt;/code&gt; disables your local customizations (CLAUDE.md, skills, hooks, MCP), so it isolates whether those are tripping it, but safe mode still sends things like your git status and directory names, so repository content itself can trip the classifier even then.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alternatives That Handle Failover
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;fallbackModel&lt;/code&gt; is the built-in, zero-dependency option and should be your first choice for model-level overload resilience. When you need more, these are the layers above it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ofox&lt;/strong&gt; exposes a single Anthropic-compatible endpoint fronting multiple providers, so failover can cross from Claude to another model's family during a full Anthropic incident. Best when provider-level resilience matters more than staying on one vendor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LiteLLM&lt;/strong&gt; is an open-source proxy with its own retry and fallback list across providers. Best when you want to self-host the routing layer and already run infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenRouter&lt;/strong&gt; is an aggregator with automatic provider fallback for a given model. Best for breadth of model catalog with minimal setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portkey&lt;/strong&gt; is a gateway with configurable fallback and load-balancing policies. Best when you want routing rules rather than a static list, plus observability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All four sit above Claude Code and complement, rather than replace, a &lt;code&gt;fallbackModel&lt;/code&gt; chain: keep the chain for cheap in-CLI model failover, and add a gateway for the provider-level case.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is fallbackModel in Claude Code?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is a &lt;code&gt;settings.json&lt;/code&gt; key, and a &lt;code&gt;--fallback-model&lt;/code&gt; CLI flag, that lists backup models Claude Code tries in order when the primary is overloaded or unavailable. You can list up to three. A switch lasts for the current turn only; the next message tries your primary again first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Claude Code fall back automatically when it hits a 529 error?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Only if you configured &lt;code&gt;fallbackModel&lt;/code&gt;. A 529 is &lt;code&gt;overloaded_error&lt;/code&gt;, one of the conditions that triggers a switch. With nothing configured, Claude Code retries the same model with backoff and then surfaces the error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does fallbackModel help with rate limit (429) errors?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Authentication, billing, rate-limit (429), request-size, and transport errors never trigger a switch. A 429 means you hit your own quota, and every model in the chain bills against the same account, so switching tiers adds no headroom.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How many fallback models can Claude Code use?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Three. Chains are capped at three after duplicate removal, and extra entries are ignored. A common chain is &lt;code&gt;opus&lt;/code&gt;, then &lt;code&gt;sonnet&lt;/code&gt;, then &lt;code&gt;haiku&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I set a fallback model in Claude Code?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For one session, launch with &lt;code&gt;claude --fallback-model sonnet,haiku&lt;/code&gt;. To persist it, add a &lt;code&gt;fallbackModel&lt;/code&gt; array to &lt;code&gt;settings.json&lt;/code&gt;, for example &lt;code&gt;["claude-sonnet-5", "claude-haiku-4-5"]&lt;/code&gt;. The flag beats the setting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does the fallback model stay active for the whole session?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. A switch applies to the current turn only, so a transient overload does not lock the session onto a lower tier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the difference between fallbackModel and automatic model fallback?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;fallbackModel&lt;/code&gt; (fallback model chains) covers availability, firing on overload or unavailability. Automatic model fallback is a separate Fable 5 mechanism where a safety classifier reroutes a flagged request to Opus. They only share the word fallback.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can Claude Code fall back to a non-Anthropic model?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not through &lt;code&gt;fallbackModel&lt;/code&gt;. Every element resolves to a Claude model on the same account, so a full Anthropic outage takes the whole chain down together. Cross-provider failover needs a gateway that fronts more than one provider.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/claude-code-fallbackmodel-3-tier-failover-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claudecode</category>
      <category>failover</category>
      <category>anthropic</category>
    </item>
    <item>
      <title>Kimi K2.7 Code Free (2026): 3 Zero-Cost Paths, Real Caps</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Wed, 15 Jul 2026 01:40:45 +0000</pubDate>
      <link>https://dev.to/owen_fox/kimi-k27-code-free-2026-3-zero-cost-paths-real-caps-4nb6</link>
      <guid>https://dev.to/owen_fox/kimi-k27-code-free-2026-3-zero-cost-paths-real-caps-4nb6</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;"The honest answer to 'is Kimi K2.7 Code free' is that three of the paths people quote are real and one does not exist."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There is no free hosted Kimi K2.7 Code API, and no &lt;code&gt;:free&lt;/code&gt; endpoint on OpenRouter. What genuinely costs nothing: rate-limited web chat, the free Kimi Code CLI tier, and Modified-MIT downloadable weights for self-hosting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kimi K2.7 Code Free: What You Can Do at $0 (and What You Can't)
&lt;/h2&gt;

&lt;p&gt;Kimi K2.7 Code is Moonshot AI's open-weight model—approximately 1T parameters (32B active), 256K context, with a vision encoder. Below are the three legitimate zero-cost paths, checked against first-hand sources.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you want&lt;/th&gt;
&lt;th&gt;Free path that works&lt;/th&gt;
&lt;th&gt;What you can't do free&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Chat with Kimi in a browser&lt;/td&gt;
&lt;td&gt;Web chat at kimi.com, no card, rate-limited&lt;/td&gt;
&lt;td&gt;Call it as an API, or guarantee it runs K2.7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Run a coding agent for a few tasks&lt;/td&gt;
&lt;td&gt;Kimi Code CLI, free "Adagio" tier&lt;/td&gt;
&lt;td&gt;Work in it all day; it is 6 agent uses per week&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Run the model on hardware you own&lt;/td&gt;
&lt;td&gt;Download Modified-MIT weights, quantize, serve&lt;/td&gt;
&lt;td&gt;Avoid the ~577 GB+ hardware bill&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Call it as a backend API&lt;/td&gt;
&lt;td&gt;No free hosted API; no OpenRouter &lt;code&gt;:free&lt;/code&gt; variant&lt;/td&gt;
&lt;td&gt;Get a &lt;code&gt;kimi-k2.7-code:free&lt;/code&gt; endpoint, which does not exist&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The fabrication happens in the API row: people search "kimi k2.7 code free api," land on a guide that points them at an OpenRouter &lt;code&gt;:free&lt;/code&gt; route, and lose an afternoon. It is not there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decision Frame: Which Free Path Fits You
&lt;/h2&gt;

&lt;h3&gt;
  
  
  When each free path is the right call
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Use the kimi.com web chat&lt;/strong&gt; if you want to try Kimi's reasoning in a browser through copy-paste interaction. No installation or payment method required—fastest zero-cost entry point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use the free Kimi Code CLI tier&lt;/strong&gt; if you want to see the agent interact with real files and tools. The Adagio tier provides 6 agent runs weekly, sufficient to evaluate agent fit before purchasing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Self-host the Modified-MIT weights&lt;/strong&gt; if you have multi-GPU infrastructure, need offline inference, or require auditable open weights for compliance. License-free; costs appear as hardware and electricity.&lt;/p&gt;

&lt;h3&gt;
  
  
  When NOT to chase free
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Needing a hosted backend API at $0. That does not exist. The floor is the paid rate: $0.95/M input, $4.00/M output on ofox.&lt;/li&gt;
&lt;li&gt;Planning daily agent use. The free CLI tier supplies 6 uses weekly—a trial, not production infrastructure.&lt;/li&gt;
&lt;li&gt;Operating a single 24 GB or 48 GB GPU. A ~1T MoE requires hundreds of gigabytes even quantized to INT4.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Stop rule
&lt;/h3&gt;

&lt;p&gt;Evaluating output quality needs only the free web chat (ten minutes). Testing agent capabilities requires the free CLI tier (six runs). Everything beyond requires sustained programmatic access where "free" involves real constraints.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Need for Each Free Path
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Free path&lt;/th&gt;
&lt;th&gt;What you need&lt;/th&gt;
&lt;th&gt;Time to first output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Web chat (kimi.com)&lt;/td&gt;
&lt;td&gt;A browser and a Kimi login (no card)&lt;/td&gt;
&lt;td&gt;Under 1 minute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kimi Code CLI, Adagio tier&lt;/td&gt;
&lt;td&gt;The CLI installed, a free Kimi account, and a terminal&lt;/td&gt;
&lt;td&gt;A few minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-host open weights&lt;/td&gt;
&lt;td&gt;A multi-GPU or large-memory host, vLLM/SGLang/KTransformers, ~600 GB free disk&lt;/td&gt;
&lt;td&gt;Hours (download plus load)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Memory is the hard constraint for self-hosting. Kimi K2.7 Code is a ~1T-parameter MoE: even native INT4 lands in the high-hundreds of gigabytes. A single consumer GPU is not in the running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path 1: Kimi Web Chat (Genuinely Free, Rate-Limited)
&lt;/h2&gt;

&lt;p&gt;The web application at &lt;code&gt;kimi.com&lt;/code&gt; enables chat without requiring a credit card and supports code writing inline.&lt;/p&gt;

&lt;p&gt;Two limits and one caveat define this path:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No API.&lt;/strong&gt; The web chat is a user interface only. The moment you need programmatic access, this path ends and you are into the CLI, self-hosting, or a paid API.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rate limits.&lt;/strong&gt; Free tiers carry rate restrictions with unpublished fixed numbers, so treat specific figures elsewhere as unverified. Heavy usage will encounter a ceiling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model version is not guaranteed to be K2.7 Code.&lt;/strong&gt; The homepage defaults to K2.6, with K2.7 Code primarily available through the separate Kimi Code product. Do not assume the free chat hands you K2.7 Code specifically. Look at the model label in your own session, because that is the only source that reflects your account and the current rollout.&lt;/p&gt;

&lt;p&gt;The web chat lacks codebase memory and tool access, answering only pasted queries. This suffices for assessing code style and reasoning, but fails for file-reading or command execution tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path 2: The Free Kimi Code CLI Tier (Real Agent, Small Quota)
&lt;/h2&gt;

&lt;p&gt;Moonshot provides an official Kimi Code CLI with a free tier.&lt;/p&gt;

&lt;p&gt;Installation via official script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://code.kimi.com/kimi-code/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The free tier called &lt;strong&gt;Adagio&lt;/strong&gt; grants &lt;strong&gt;6 agent uses with 1 concurrent task&lt;/strong&gt; weekly, running K2.7 Code and the HighSpeed variant. Unlike the web chat, this executes as a real agent: it reads files, runs tools, and drives multi-step edits.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Kimi Code CLI tier&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;th&gt;What you get&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Adagio&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;6 agent uses/week, 1 concurrent task&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Moderato&lt;/td&gt;
&lt;td&gt;$19/mo&lt;/td&gt;
&lt;td&gt;Higher quota, agent workflows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Allegretto&lt;/td&gt;
&lt;td&gt;$39/mo&lt;/td&gt;
&lt;td&gt;More quota again&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Allegro&lt;/td&gt;
&lt;td&gt;$99/mo&lt;/td&gt;
&lt;td&gt;Team-scale usage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vivace&lt;/td&gt;
&lt;td&gt;$199/mo&lt;/td&gt;
&lt;td&gt;Top quota&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Six agent runs is enough to point Kimi at a real refactor, a bug hunt, and a test-writing pass, and decide whether its agent behavior is worth paying for. It is not enough to adopt it as your daily coding agent.&lt;/p&gt;

&lt;p&gt;For integration into existing coding agents, Moonshot exposes an Anthropic-compatible endpoint: set &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; to &lt;code&gt;https://api.moonshot.ai/anthropic&lt;/code&gt; to use Kimi with Claude Code or similar tools. This path charges per-token rather than using the free CLI tier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path 3: Self-Host the Open Weights (Free of License, Not of Hardware)
&lt;/h2&gt;

&lt;p&gt;Moonshot released weights under Modified MIT on Hugging Face (&lt;code&gt;moonshotai/Kimi-K2.7-Code&lt;/code&gt;). This license requires attribution from very large operators but costs nothing for developers and small teams—behaving like standard MIT.&lt;/p&gt;

&lt;p&gt;The license does not provide free compute. Kimi K2.7 Code is a ~1T-total-parameter MoE with about 32B active per token, 61 layers, and 384 experts, plus a 400M MoonViT vision encoder. Moonshot recommends vLLM, SGLang, or KTransformers with native INT4 quantization.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Precision&lt;/th&gt;
&lt;th&gt;Approx. weights size&lt;/th&gt;
&lt;th&gt;Realistic host&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Native INT4&lt;/td&gt;
&lt;td&gt;~577-639 GB&lt;/td&gt;
&lt;td&gt;Multi-GPU server (e.g. 8x A100/H100 class)&lt;/td&gt;
&lt;td&gt;Community estimate; card gives no official figure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;INT4 + KV cache/overhead&lt;/td&gt;
&lt;td&gt;~830 GB+ total memory&lt;/td&gt;
&lt;td&gt;Large-memory host&lt;/td&gt;
&lt;td&gt;Comfortable inference headroom&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full precision&lt;/td&gt;
&lt;td&gt;Well over 1 TB&lt;/td&gt;
&lt;td&gt;H200-class cluster&lt;/td&gt;
&lt;td&gt;Production throughput&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Moonshot's own model card publishes no VRAM or disk number, so the sizes above come from third-party self-host calculators and should be read as directional, not exact.&lt;/p&gt;

&lt;p&gt;Once served, an OpenAI-compatible endpoint becomes available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="c1"&gt;# vLLM started with: vllm serve moonshotai/Kimi-K2.7-Code --quantization compressed-tensors
&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://localhost:8000/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;not-needed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;moonshotai/Kimi-K2.7-Code&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Refactor this function to async.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This path caps at the hardware bill. It is free of license fees and free of per-token cost, but the entry ticket is a large-memory, multi-GPU host, and the electricity is not free either. Self-hosting wins at high volume, offline requirements, and compliance-mandated auditable weights—not casual use.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Path That Does Not Exist: "Kimi K2.7 Code Free on OpenRouter"
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;There is no free Kimi K2.7 Code endpoint on OpenRouter.&lt;/strong&gt; Verified against the OpenRouter models API on July 14, 2026:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt; exists as a paid model (~$0.72/M input, ~$3.49/M output).&lt;/li&gt;
&lt;li&gt;OpenRouter lists &lt;code&gt;moonshotai/kimi-k2.6:free&lt;/code&gt; (the older K2.6, not K2.7 Code), showing an empty endpoints list with no live provider.&lt;/li&gt;
&lt;li&gt;A URL like &lt;code&gt;openrouter.ai/moonshotai/kimi-k2.7-code:free&lt;/code&gt; returns an HTTP 200 because it loads the single-page app shell, not because a free route exists.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;OpenRouter's free tier is real but does not cover this model at this version. For coding work with free API tiers, choose from &lt;code&gt;:free&lt;/code&gt; variants, which carry day and minute rate limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  One More Free-for-You Path: The Puter User-Pays Bridge
&lt;/h2&gt;

&lt;p&gt;Puter exposes &lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt; through its browser SDK on a "user-pays" model. Developers integrate the SDK at zero cost; end users cover their own token consumption. It is free the way a BYO-bar is free to the host.&lt;/p&gt;

&lt;p&gt;Legitimate for client-side tools where users bring their own usage. Not a method for free tokens on your backend. Puter's "unlimited" framing describes the developer's cost, not a documented usage limit. Review the platform's billing and data terms before deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Every Free Path to Its Limit: A Side-by-Side
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowchart TD
  A[Need Kimi K2.7 Code at $0?] --&amp;gt; B{How do you want to use it?}
  B --&amp;gt;|Chat in a browser| C[kimi.com web chat]
  B --&amp;gt;|Drive an agent for a few tasks| D[Kimi Code CLI Adagio]
  B --&amp;gt;|Run on my own hardware| E[Modified-MIT weights]
  B --&amp;gt;|Ship in an app| F[Puter user-pays]
  B --&amp;gt;|Call as a backend API| G[No free hosted API]
  C --&amp;gt; C1[Cap: no API, rate-limited, version not guaranteed K2.7]
  D --&amp;gt; D1[Cap: 6 agent uses/week, 1 concurrent]
  E --&amp;gt; E1[Cap: ~577GB+ INT4, multi-GPU host]
  F --&amp;gt; F1[Cap: end users pay tokens, no SLA]
  G --&amp;gt; G1[Floor is paid: $0.95/M in, $4.00/M out]
  G1 --&amp;gt; H[Managed: moonshotai/kimi-k2.7-code on one endpoint]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;Free for you?&lt;/th&gt;
&lt;th&gt;Hard limit&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Web chat (kimi.com)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No API, rate-capped, version not guaranteed K2.7&lt;/td&gt;
&lt;td&gt;Evaluating output quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kimi Code CLI Adagio&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;6 agent uses/week, 1 concurrent&lt;/td&gt;
&lt;td&gt;Trying the agent on real tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-host weights&lt;/td&gt;
&lt;td&gt;Yes (no license fee)&lt;/td&gt;
&lt;td&gt;~577 GB+ INT4, multi-GPU host&lt;/td&gt;
&lt;td&gt;Offline / auditable / high volume&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Puter user-pays&lt;/td&gt;
&lt;td&gt;Yes (users pay)&lt;/td&gt;
&lt;td&gt;Cost moves to end users, no SLA&lt;/td&gt;
&lt;td&gt;Client-side apps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter &lt;code&gt;:free&lt;/code&gt; K2.7 Code&lt;/td&gt;
&lt;td&gt;Does not exist&lt;/td&gt;
&lt;td&gt;No such endpoint (K2.6 &lt;code&gt;:free&lt;/code&gt; listed with no live provider)&lt;/td&gt;
&lt;td&gt;(not an option)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Managed API (ofox / Moonshot)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Paid: $0.95/M in, $4.00/M out&lt;/td&gt;
&lt;td&gt;Backends that need reliability&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Common Errors When Chasing Free Kimi K2.7 Code
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Cause&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;model not found&lt;/code&gt; for &lt;code&gt;moonshotai/kimi-k2.7-code:free&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;That free variant does not exist&lt;/td&gt;
&lt;td&gt;Use the paid &lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt;, the free CLI tier, or self-host&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter &lt;code&gt;:free&lt;/code&gt; call finds nothing usable&lt;/td&gt;
&lt;td&gt;The &lt;code&gt;kimi-k2.6:free&lt;/code&gt; ID is older and has no live provider&lt;/td&gt;
&lt;td&gt;K2.6 free is a different model with an empty endpoints list; K2.7 Code has no free endpoint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free web chat writes weaker code than expected&lt;/td&gt;
&lt;td&gt;Free chat may serve K2.6, not K2.7 Code&lt;/td&gt;
&lt;td&gt;Check the model label in the session; K2.7 Code lives in the Kimi Code product&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CLI stops after a few tasks&lt;/td&gt;
&lt;td&gt;Adagio free tier is 6 agent uses/week&lt;/td&gt;
&lt;td&gt;Wait for the weekly reset, upgrade, or switch paths&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vLLM load fails or OOMs on one GPU&lt;/td&gt;
&lt;td&gt;~1T MoE will not fit a single GPU&lt;/td&gt;
&lt;td&gt;Use a multi-GPU host; INT4 weights alone are hundreds of GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kimi Code plan looks like $19 for K2.5&lt;/td&gt;
&lt;td&gt;You are reading a stale pre-K2.7 blog&lt;/td&gt;
&lt;td&gt;Use the official pricing page; tiers now tie to K2.7 Code&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Free Kimi K2.7 Code for a Team: Where $0 Stops Scaling
&lt;/h2&gt;

&lt;p&gt;The free paths work for individuals. Team scaling breaks immediately.&lt;/p&gt;

&lt;p&gt;The web chat has no shared-account model. Each developer opens their own session against personal rate limits—no pooled quota or usage dashboard. The free CLI tier fails worse for teams: 6 agent uses a week is a single person's trial, and there is no way to pool it across engineers. Two people evaluating is fine. A ten-person team trying to standardize on the free tiers is not a plan.&lt;/p&gt;

&lt;p&gt;Self-hosting scales for a team but ceases being free once hardware is provisioned. A single large-memory host running INT4 weights can handle a few concurrent agent sessions; teams require real GPUs, power, and operational management. At scale, per-token API costs often undercut amortized self-host infrastructure.&lt;/p&gt;

&lt;p&gt;For teams: use the free paths to evaluate, then standardize on a paid endpoint with per-key usage visibility. Shared configuration means one base URL, one model ID, unified billing against an org wallet, and traceable usage—features no free tier provides.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alternatives: When the Free Paths Cap Out
&lt;/h2&gt;

&lt;p&gt;Free is a starting point, not a conclusion. When rate limits, quotas, or hardware bills activate, practical options shift to "cheapest reliable API," with no honest $0 answer for a frontier model.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;K2.7 Code API rate&lt;/th&gt;
&lt;th&gt;What you get&lt;/th&gt;
&lt;th&gt;When to pick it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;ofox&lt;/strong&gt; (&lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;$0.95/M in, $4.00/M out ($0.19/M cached)&lt;/td&gt;
&lt;td&gt;One OpenAI-compatible endpoint, one key across many models, 256K context&lt;/td&gt;
&lt;td&gt;You want Kimi plus other models behind a single API without per-vendor signups&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Moonshot direct&lt;/td&gt;
&lt;td&gt;Paid per token, Anthropic + OpenAI compatible&lt;/td&gt;
&lt;td&gt;First-party API, Kimi Code CLI subscription option&lt;/td&gt;
&lt;td&gt;You only use Kimi and want the source, or want the CLI plans&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter&lt;/td&gt;
&lt;td&gt;~$0.72/M in, ~$3.49/M out&lt;/td&gt;
&lt;td&gt;Aggregator with usage-based routing&lt;/td&gt;
&lt;td&gt;You already route everything through OpenRouter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-host&lt;/td&gt;
&lt;td&gt;$0/token, ~577 GB+ hardware cost&lt;/td&gt;
&lt;td&gt;Full control, offline, Modified-MIT weights&lt;/td&gt;
&lt;td&gt;Very high volume or hard compliance needs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;When free paths exhaust and you need a managed Kimi K2.7 Code API without Moonshot signups or self-hosted infrastructure, ofox serves the model at $0.95/M input and $4.00/M output on one OpenAI-compatible endpoint. The same OpenAI SDK pattern used for self-hosting applies, changing only base URL and API key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.ofox.ai/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_OFOX_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;moonshotai/kimi-k2.7-code&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;# 256K context; swap to -highspeed for the faster variant
&lt;/span&gt;    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Refactor this function to async.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is not free, and no gateway claiming a frontier model at $0 per token is telling the truth. The honest trade sequence: free chat for evaluation, free CLI tier for agent testing, self-host if hardware exists, paid managed endpoint for reliable API access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources Checked for This Refresh
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hugging Face model repo: &lt;a href="https://huggingface.co/moonshotai/Kimi-K2.7-Code" rel="noopener noreferrer"&gt;https://huggingface.co/moonshotai/Kimi-K2.7-Code&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Kimi Code CLI page: &lt;a href="https://www.kimi.com/code" rel="noopener noreferrer"&gt;https://www.kimi.com/code&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Kimi K2.7 Code pricing tiers: &lt;a href="https://www.kimi.com/resources/kimi-k2-7-code-pricing" rel="noopener noreferrer"&gt;https://www.kimi.com/resources/kimi-k2-7-code-pricing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Moonshot OpenAI/Anthropic API migration docs: &lt;a href="https://platform.moonshot.ai/docs/guide/migrating-from-openai-to-kimi" rel="noopener noreferrer"&gt;https://platform.moonshot.ai/docs/guide/migrating-from-openai-to-kimi&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;OpenRouter Kimi K2.7 Code model page: &lt;a href="https://openrouter.ai/moonshotai/kimi-k2.7-code" rel="noopener noreferrer"&gt;https://openrouter.ai/moonshotai/kimi-k2.7-code&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;ofox managed Kimi K2.7 Code model page: &lt;a href="https://ofox.ai/models/moonshotai/kimi-k2.7-code" rel="noopener noreferrer"&gt;https://ofox.ai/models/moonshotai/kimi-k2.7-code&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;"The pattern with every 'is it free' question about a frontier model is the same: a demo, a trial, or the weights are free, the sustained compute never is." Kimi K2.7 Code exemplifies this with Modified-MIT downloadable weights, browser chat access, six-run agent evaluation, and a mandatory paid floor for scaled token use or GPU infrastructure. Claims of zero-cost APIs shift costs to users or lack substance.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/kimi-k2-7-code-free-zero-cost-paths-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>kimi</category>
      <category>openweights</category>
      <category>freetier</category>
    </item>
    <item>
      <title>GLM 5.2 Free (2026): 3 Zero-Cost Paths and Where Limits Hit</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Tue, 14 Jul 2026 06:02:36 +0000</pubDate>
      <link>https://dev.to/owen_fox/glm-52-free-2026-3-zero-cost-paths-and-where-limits-hit-3g82</link>
      <guid>https://dev.to/owen_fox/glm-52-free-2026-3-zero-cost-paths-and-where-limits-hit-3g82</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The honest answer to "is GLM 5.2 free" is that two of the four paths people quote are real, one is real but shifts the bill to someone else, and one does not exist. There is no free hosted GLM 5.2 API from Z.ai and no &lt;code&gt;:free&lt;/code&gt; GLM 5.2 endpoint on OpenRouter. What is genuinely free is a rate-limited web chat and the MIT weights you can download and run on your own metal. Everything else costs either tokens or GPU hours.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  GLM 5.2 Free: What You Can Do at $0 (and What You Can't)
&lt;/h2&gt;

&lt;p&gt;GLM 5.2 is Zhipu's frontier open-weights coding model: a 753B-total-parameter MoE with a 1M-token context, released under the MIT license. "Free" gets searched a lot around it, and most listicles answer by pasting signup pages. This one checks each path against a first-hand source and tells you where it caps.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you want&lt;/th&gt;
&lt;th&gt;Free path that works&lt;/th&gt;
&lt;th&gt;What you can't do free&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Chat with a GLM model in a browser&lt;/td&gt;
&lt;td&gt;Z.ai web chat, no card, rate-limited&lt;/td&gt;
&lt;td&gt;Call it as an API from the free chat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Run the model on hardware you own&lt;/td&gt;
&lt;td&gt;Download MIT weights, quantize, run in llama.cpp&lt;/td&gt;
&lt;td&gt;Avoid the 240 GB+ RAM bill&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Call it as an API from code&lt;/td&gt;
&lt;td&gt;No free hosted API from Z.ai; no OpenRouter &lt;code&gt;:free&lt;/code&gt; variant&lt;/td&gt;
&lt;td&gt;Get a &lt;code&gt;z-ai/glm-5.2:free&lt;/code&gt; endpoint, which does not exist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ship it inside an app for your users&lt;/td&gt;
&lt;td&gt;Puter user-pays bridge (users cover tokens)&lt;/td&gt;
&lt;td&gt;Remove the token cost; it moves to end users&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The two paths in the first two rows are the real zero-cost options for an individual. The API row is where fabrication happens most: people search "glm 5.2 free api," land on a blog that invents an OpenRouter &lt;code&gt;:free&lt;/code&gt; route, and waste an afternoon. It is not there.&lt;/p&gt;

&lt;p&gt;If you already know you want a managed API and "free" was only a starting filter, skip to Alternatives. If you want to spend $0, keep reading. The paths are ranked below by how far they actually get you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decision Frame: Which Free Path Fits You
&lt;/h2&gt;

&lt;p&gt;Pick before you read the details.&lt;/p&gt;

&lt;h3&gt;
  
  
  When each free path is the right call
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use the Z.ai web chat&lt;/strong&gt; if you want to try GLM's writing and reasoning in a browser, ask one-off questions, or do light coding by copy-paste. No install, no card. This is the fastest zero-cost path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-host the MIT weights&lt;/strong&gt; if you have a 256 GB+ machine (or a rack), need offline or air-gapped inference, or your compliance team requires auditable open weights. Free of license fees; you pay in RAM and electricity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a user-pays bridge (Puter)&lt;/strong&gt; if you are building an app and want each end user to cover their own GLM tokens instead of you fronting the bill. Free for you as the developer, not free in aggregate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When NOT to chase free
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You need a hosted GLM 5.2 API for a backend and expect it at $0. That does not exist. The floor is the paid rate: $1.4/M input, $4.4/M output.&lt;/li&gt;
&lt;li&gt;You have a 64 GB or 128 GB laptop and expect to self-host. The weights do not fit at usable quality; the smallest sane quant needs ~240 GB.&lt;/li&gt;
&lt;li&gt;You need reliability with an SLA. Every free path here is best-effort. Rate limits, quota resets, and hardware failures are yours to absorb.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Stop rule
&lt;/h3&gt;

&lt;p&gt;If you only need to &lt;em&gt;evaluate&lt;/em&gt; GLM 5.2's output quality, the free Z.ai web chat answers that in ten minutes and you can stop reading. Everything past this section is for people who need programmatic or self-hosted access, where "free" has real trade-offs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Need for Each Free Path
&lt;/h2&gt;

&lt;p&gt;The three real free paths ask for different things. Line them up before you start so you do not get halfway into a 240 GB download and discover your machine cannot hold it.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Free path&lt;/th&gt;
&lt;th&gt;What you need&lt;/th&gt;
&lt;th&gt;Time to first output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Z.ai web chat&lt;/td&gt;
&lt;td&gt;A browser and a Z.ai account (no card)&lt;/td&gt;
&lt;td&gt;Under 1 minute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-host MIT weights&lt;/td&gt;
&lt;td&gt;A 256 GB+ machine, &lt;code&gt;llama.cpp&lt;/code&gt; or LM Studio, ~240 GB free disk, a GGUF quant&lt;/td&gt;
&lt;td&gt;Hours (download plus load)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Puter user-pays bridge&lt;/td&gt;
&lt;td&gt;The Puter SDK in your app, and end users who each cover their own tokens&lt;/td&gt;
&lt;td&gt;An afternoon of integration&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For the self-host path specifically, the memory number is the hard gate. GLM 5.2 is a 753B-parameter MoE, so the smallest usable quant needs roughly 240 GB of RAM or unified memory. A laptop with 16 GB, 32 GB, or 64 GB is not in the running, regardless of GPU. If you are on consumer hardware and the numbers do not add up, the web chat and the paid API are your only routes, and there is no shame in that; almost nobody self-hosts a 753B model at home.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path 1: Z.ai Web Chat (Genuinely Free, Rate-Limited)
&lt;/h2&gt;

&lt;p&gt;The Z.ai web interface at &lt;code&gt;chat.z.ai&lt;/code&gt; lets you chat with a GLM model without a credit card. This is the least-friction zero-cost path: open the page, sign in, and type.&lt;/p&gt;

&lt;p&gt;Two limits define it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No API.&lt;/strong&gt; The free web chat is a UI. You cannot point Cline, Claude Code, or your own script at it. The moment you need programmatic access, this path ends and you are into the paid API or self-hosting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limits.&lt;/strong&gt; Free-tier message throughput is capped and the exact quota has changed across releases, so treat any specific number you read elsewhere as stale. Check the current limit in the interface before you lean on it for real work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is one caveat worth being precise about, because the SEO farms disagree with each other on it. Which GLM version the free web chat serves has moved between releases, and Z.ai's own documentation tied GLM 5.2 early access to the paid GLM Coding Plan. Some free-tier sessions may serve an earlier GLM while 5.2 sits behind the subscription. Do not assume the free chat hands you 5.2 specifically. Look at the model label in your own session, because that is the only source that reflects your account and the current rollout. If the label does not say 5.2, the free web chat is giving you an older model, and the &lt;a href="https://ofox.ai/blog/glm-5-2-access-guide-2026/" rel="noopener noreferrer"&gt;paid Coding Plan&lt;/a&gt; or an alternative endpoint is your route to 5.2 itself.&lt;/p&gt;

&lt;p&gt;One more thing to plan around: the free web chat has no memory of your codebase and no tool access. It answers what you paste into the box. That is fine for judging whether GLM's reasoning and code style suit you, and it is useless for anything that needs to read your files or run commands. If your evaluation question is "does this model write code I would ship," the free chat answers it. If your question is "can this model drive my agent loop," the free chat cannot even be wired to try.&lt;/p&gt;

&lt;p&gt;The web chat caps at three things: no API, capped messages, and an unguaranteed model version. It is good for evaluation and light chat, not for a workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path 2: Self-Host the MIT Weights (Free of License, Not of Hardware)
&lt;/h2&gt;

&lt;p&gt;This is the path that makes GLM 5.2 genuinely, permanently free of per-token cost. Zhipu published the weights under the MIT license on Hugging Face under the &lt;code&gt;zai-org&lt;/code&gt; organization. Verified on July 13, 2026: the &lt;code&gt;zai-org/GLM-5.2&lt;/code&gt; repo is not gated, carries the MIT tag on its model card, and has been downloaded over 460,000 times. MIT means commercial use, modification, and redistribution are all allowed.&lt;/p&gt;

&lt;p&gt;What MIT does not give you is free compute. GLM 5.2 is a 753B-total-parameter MoE. At full BF16 precision the weights are about 1.5 TB, which fits no single desktop. Free local inference means quantizing to GGUF and accepting a memory floor.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Quant&lt;/th&gt;
&lt;th&gt;Approx. memory needed&lt;/th&gt;
&lt;th&gt;Realistic machine&lt;/th&gt;
&lt;th&gt;Speed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;2-bit GGUF&lt;/td&gt;
&lt;td&gt;~240 GB&lt;/td&gt;
&lt;td&gt;256 GB Mac Studio / big DDR5 box&lt;/td&gt;
&lt;td&gt;~3-9 tok/s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4-bit GGUF&lt;/td&gt;
&lt;td&gt;~376 GB&lt;/td&gt;
&lt;td&gt;512 GB Mac Studio&lt;/td&gt;
&lt;td&gt;Usable, better quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8-bit GGUF&lt;/td&gt;
&lt;td&gt;~750 GB&lt;/td&gt;
&lt;td&gt;Multi-socket server&lt;/td&gt;
&lt;td&gt;Near-lossless, slow to load&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full BF16&lt;/td&gt;
&lt;td&gt;~1.5 TB&lt;/td&gt;
&lt;td&gt;8x H100/H200 class&lt;/td&gt;
&lt;td&gt;Production throughput&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The practical floor for a single person is the 2-bit quant on a 256 GB machine. A single 24 GB GPU (a 4090, say) cannot hold even the 2-bit quant on its own and falls back to system-RAM offload, which drops you into low single-digit tokens per second. There is no config that runs this model well on a 64 GB or 128 GB laptop.&lt;/p&gt;

&lt;p&gt;The mechanics of picking a quant, wiring &lt;code&gt;llama.cpp&lt;/code&gt; or LM Studio, and quantizing the KV cache to stretch context are their own job. Rather than re-derive the hardware math here, use the two guides that cover it end to end:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;a href="https://ofox.ai/blog/glm-5-2-run-locally-gguf-2026/" rel="noopener noreferrer"&gt;GLM 5.2 local GGUF run guide&lt;/a&gt; for a single Mac Studio or a desktop with one GPU and a lot of RAM. It covers quant picks, &lt;code&gt;llama.cpp&lt;/code&gt; flags, LM Studio, and the speed you should expect.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://ofox.ai/blog/glm-5-2-self-host-vllm-hardware-cost-2026/" rel="noopener noreferrer"&gt;GLM 5.2 self-host vLLM hardware and cost guide&lt;/a&gt; for serving the full-precision model to a team on H200-class GPUs, with the monthly cost math versus a hosted plan.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two footnotes that trip people up on the self-host path. First, the 1M context does not come free with the weights on consumer hardware. The KV cache for a context that long needs hundreds of gigabytes on top of the weights, so on a 256 GB machine you realistically run 16K to 64K context, not the full million. Second, the download itself is large. Even the 2-bit GGUF is around 240 GB to pull and store, so budget disk and bandwidth before you start, not after.&lt;/p&gt;

&lt;p&gt;A minimal smoke-test loop once you have a GGUF build and llama.cpp running locally looks like this, using the same OpenAI shape pointed at your own server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="c1"&gt;# llama.cpp server started with: ./llama-server -m glm-5.2-UD-IQ2_M.gguf --host 0.0.0.0 --port 8080
&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://localhost:8080/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;not-needed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;glm-5.2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Say OK if you are running.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This path caps at the memory bill. It is free of license fees, but a 256 GB machine is the entry ticket, and single-GPU boxes run it slowly. The math tends to favor a hosted endpoint for most people: below roughly 3,000 prompts a week, a paid plan or a managed API is cheaper than the electricity plus depreciation on a self-host node that sits idle most of the day. Self-hosting wins on volume, on offline requirements, and on compliance mandates for auditable weights, not on casual use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path 3: Third-Party "User-Pays" Bridges (Free for You, Not for Everyone)
&lt;/h2&gt;

&lt;p&gt;There is a real free-for-the-developer path that gets overlooked: platforms like Puter expose &lt;code&gt;z-ai/glm-5.2&lt;/code&gt; on a "user-pays" model. The developer integrates the SDK and pays nothing; each end user covers their own token cost. It is free the way a BYO-bar is free to the host.&lt;/p&gt;

&lt;p&gt;This is legitimate for a specific shape of app: a client-side tool where users bring their own usage and you do not want to front an aggregate bill. It is not a way to get free tokens for your own backend, and it is not an SLA. Read the platform's billing and data terms before you ship it, because the "unlimited, no key" framing describes the developer's cost, not the model's. It also puts a third party between your users and the model, which matters if you have data-handling obligations.&lt;/p&gt;

&lt;p&gt;This path caps in two places. The cost does not disappear, it moves to your users. And you are trusting a third-party bridge's uptime and terms, not Z.ai's directly. For a hobby app or a demo that is fine. For anything a business depends on, you want a contract with whoever runs the inference, which a free bridge does not give you.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Path That Does Not Exist: "OpenRouter Free"
&lt;/h2&gt;

&lt;p&gt;This is the one to be blunt about, because it is the most-searched false lead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There is no free GLM 5.2 endpoint on OpenRouter.&lt;/strong&gt; Checked against the OpenRouter models API on July 13, 2026:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;z-ai/glm-5.2&lt;/code&gt; exists and it is a paid model at $0.93/M input, $3.00/M output, with a 1M context window.&lt;/li&gt;
&lt;li&gt;OpenRouter lists 23 model variants whose IDs end in &lt;code&gt;:free&lt;/code&gt;. None of them is GLM 5.2.&lt;/li&gt;
&lt;li&gt;A URL like &lt;code&gt;openrouter.ai/z-ai/glm-5.2:free&lt;/code&gt; returns an HTTP 200 because it loads the single-page app shell, not because a free route exists behind it. Do not confuse a page that loads with an endpoint that works. This is the exact trap that produces "free GLM 5.2 on OpenRouter" listicles: someone sees the page render and assumes the route is live.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;OpenRouter's free tier is real, it just does not cover this model. For context on what it &lt;em&gt;does&lt;/em&gt; give you, the caps come straight from OpenRouter's rate-limit reference:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;OpenRouter free-tier rule&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Requests/day, purchased &amp;lt; $10 credit&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Requests/day, purchased ≥ $10 credit&lt;/td&gt;
&lt;td&gt;1000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Requests/minute on &lt;code&gt;:free&lt;/code&gt; variants&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So if you want a &lt;em&gt;free&lt;/em&gt; model on OpenRouter for coding, you pick from its 23 &lt;code&gt;:free&lt;/code&gt; variants (DeepSeek, Qwen, Gemma, Nemotron and others), not GLM 5.2. Those free variants come with the caps in the table above and no guarantee of which physical provider serves them on any given request. For a broader ranking of which free API tiers actually survive real coding work, see the &lt;a href="https://ofox.ai/blog/free-llm-api-tiers-ranked-coding-2026/" rel="noopener noreferrer"&gt;free LLM API tiers ranked for coding&lt;/a&gt; guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  Free Path to Its Limit: A Side-by-Side
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowchart TD
  A[Need GLM 5.2 at $0?] --&amp;gt; B{How do you want to use it?}
  B --&amp;gt;|Chat in a browser| C[Z.ai web chat]
  B --&amp;gt;|Run on my own machine| D[MIT weights + GGUF]
  B --&amp;gt;|Ship in an app| E[Puter user-pays]
  B --&amp;gt;|Call as a backend API| F[No free hosted API]
  C --&amp;gt; C1[Cap: no API, rate limits, version not guaranteed 5.2]
  D --&amp;gt; D1[Cap: needs 240GB+ RAM, ~3-9 tok/s on 256GB]
  E --&amp;gt; E1[Cap: users pay tokens, no SLA]
  F --&amp;gt; F1[Floor is paid: $1.4/M in, $4.4/M out]
  F1 --&amp;gt; G[Managed: z-ai/glm-5.2 on one endpoint]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;Free for you?&lt;/th&gt;
&lt;th&gt;Hard limit&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Z.ai web chat&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No API, rate-capped, version not guaranteed 5.2&lt;/td&gt;
&lt;td&gt;Evaluating output quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-host MIT weights&lt;/td&gt;
&lt;td&gt;Yes (no license fee)&lt;/td&gt;
&lt;td&gt;~240 GB RAM floor, slow on 1 GPU&lt;/td&gt;
&lt;td&gt;Offline / auditable / high volume&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Puter user-pays&lt;/td&gt;
&lt;td&gt;Yes (users pay)&lt;/td&gt;
&lt;td&gt;Cost moves to end users, no SLA&lt;/td&gt;
&lt;td&gt;Client-side apps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter &lt;code&gt;:free&lt;/code&gt; GLM 5.2&lt;/td&gt;
&lt;td&gt;Does not exist&lt;/td&gt;
&lt;td&gt;No such endpoint&lt;/td&gt;
&lt;td&gt;(not an option)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Managed API (ofox / Z.ai)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Paid: $1.4/M in, $4.4/M out&lt;/td&gt;
&lt;td&gt;Backends that need reliability&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Common Errors When Chasing Free GLM 5.2
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Cause&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;model not found&lt;/code&gt; for &lt;code&gt;z-ai/glm-5.2:free&lt;/code&gt; on OpenRouter&lt;/td&gt;
&lt;td&gt;That free variant does not exist&lt;/td&gt;
&lt;td&gt;Use a real &lt;code&gt;:free&lt;/code&gt; model, or the paid &lt;code&gt;z-ai/glm-5.2&lt;/code&gt;, or self-host&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free web chat gives shorter or weaker answers than expected&lt;/td&gt;
&lt;td&gt;Free tier may serve an older GLM, not 5.2&lt;/td&gt;
&lt;td&gt;Check the model label in the session; 5.2 access can require the paid Coding Plan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;429 Too Many Requests&lt;/code&gt; in the web chat&lt;/td&gt;
&lt;td&gt;Free-tier message rate limit hit&lt;/td&gt;
&lt;td&gt;Wait for the quota window, or move to a paid API/self-host&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local &lt;code&gt;llama.cpp&lt;/code&gt; load fails or OOMs&lt;/td&gt;
&lt;td&gt;Quant too large for your RAM&lt;/td&gt;
&lt;td&gt;Drop to the 2-bit GGUF (~240 GB); a 64/128 GB box cannot run it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;~1-3 tok/s on a single 24 GB GPU&lt;/td&gt;
&lt;td&gt;Weights offloaded to system RAM&lt;/td&gt;
&lt;td&gt;Add DDR5 (256 GB+) or accept the speed; the GPU can't hold the quant alone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Puter integration bills you, not users&lt;/td&gt;
&lt;td&gt;Misread the user-pays model&lt;/td&gt;
&lt;td&gt;Confirm the client-side flow so each end user covers their own tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Free GLM 5.2 for a Team: Where $0 Stops Scaling
&lt;/h2&gt;

&lt;p&gt;The free paths are built for one person. They break down the moment a team shares them, and it is worth knowing how before you plan around them.&lt;/p&gt;

&lt;p&gt;The web chat has no shared-account model. Each developer opens their own session and hits their own rate limit, and there is no pooled quota, no usage dashboard, and no way to see who spent what. Two people on the free chat is fine. A ten-person team trying to standardize on it is not a plan, it is ten separate best-effort sessions.&lt;/p&gt;

&lt;p&gt;Self-hosting is the path that does scale for a team, but it stops being free the instant you need throughput for more than one person at a time. One 256 GB Mac Studio running a 2-bit quant serves a single coding-agent session at 3-9 tokens per second. Point three developers at it and they queue behind each other. Serving a team means the full-precision model on H200-class GPUs, which is a real hardware budget, covered in the &lt;a href="https://ofox.ai/blog/glm-5-2-self-host-vllm-hardware-cost-2026/" rel="noopener noreferrer"&gt;self-host vLLM hardware and cost guide&lt;/a&gt;. At that point you are comparing the amortized cost of a GPU rack against a per-token API bill, and for most teams the API wins until volume is very high.&lt;/p&gt;

&lt;p&gt;The user-pays bridge is the one free-for-you path that survives a team, precisely because it does not pool anything: each end user pays their own way. That works for a product with external users. It does not work for an internal engineering team, where "each user pays their own tokens" just means every engineer needs a billing relationship with a third party, which is worse than one shared API key.&lt;/p&gt;

&lt;p&gt;The honest read for a team: use the free paths to evaluate, then standardize on a paid endpoint with per-key usage visibility. A shared config there is one base URL and one model ID, and everyone bills against the same org wallet with traceable usage. That is the Team-tier story the &lt;a href="https://ofox.ai/blog/glm-5-2-access-guide-2026/" rel="noopener noreferrer"&gt;access guide&lt;/a&gt; covers for the Coding Plan, and the same shape works through a managed gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alternatives: When the Free Paths Cap Out
&lt;/h2&gt;

&lt;p&gt;Free is a starting filter, not a finish line. Once the web chat's rate limit or the self-host RAM bill bites, the practical question becomes "cheapest reliable API," and there is no honest $0 answer for a frontier model. Here is the ranked list, ofox first, then the others, with real numbers.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;GLM 5.2 API rate&lt;/th&gt;
&lt;th&gt;What you get&lt;/th&gt;
&lt;th&gt;When to pick it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;ofox&lt;/strong&gt; (&lt;code&gt;z-ai/glm-5.2&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;$1.4/M in, $4.4/M out&lt;/td&gt;
&lt;td&gt;One OpenAI-compatible endpoint, one key across many models; &lt;code&gt;z-ai/glm-5.2&lt;/code&gt; itself ships a full 1M-token context window&lt;/td&gt;
&lt;td&gt;You want GLM 5.2 plus other models behind a single API without per-vendor signups&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Z.ai direct&lt;/td&gt;
&lt;td&gt;$1.4/M in, $4.4/M out ($0.26/M cached)&lt;/td&gt;
&lt;td&gt;First-party API, GLM Coding Plan subscription option&lt;/td&gt;
&lt;td&gt;You only use GLM and want the source, or want the flat-fee Coding Plan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter&lt;/td&gt;
&lt;td&gt;$0.93/M in, $3.00/M out&lt;/td&gt;
&lt;td&gt;Aggregator with usage-based routing&lt;/td&gt;
&lt;td&gt;You already route everything through OpenRouter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-host&lt;/td&gt;
&lt;td&gt;$0/token, ~240 GB RAM cost&lt;/td&gt;
&lt;td&gt;Full control, offline, MIT weights&lt;/td&gt;
&lt;td&gt;Very high volume or hard compliance needs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;When the free paths run out and you want GLM 5.2 as a managed API without the Z.ai signup or a self-host cluster, ofox serves &lt;code&gt;z-ai/glm-5.2&lt;/code&gt; at $1.4/M input and $4.4/M output on one OpenAI-compatible endpoint. Same OpenAI SDK shape as the local smoke test above, just a different base URL and one key that also reaches the other models in the &lt;a href="https://ofox.ai/models/z-ai/glm-5.2" rel="noopener noreferrer"&gt;ofox catalog&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.ofox.ai/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_OFOX_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;z-ai/glm-5.2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;# this model ID already serves the full 1M-token context window
&lt;/span&gt;    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Refactor this function to async.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is not free, and no gateway claiming a frontier model at $0 per token is telling the truth. The honest trade is free chat for evaluation, MIT self-host if you have the hardware, and a paid managed endpoint when you need an API that just works. If you are weighing GLM 5.2's paid rate against the obvious Western alternative, the &lt;a href="https://ofox.ai/blog/glm-5-2-vs-gpt-5-5-cost-2026/" rel="noopener noreferrer"&gt;GLM 5.2 vs GPT-5.5 cost comparison&lt;/a&gt; runs the per-task math so you can pick on price rather than headline hype.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources Checked for This Refresh
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hugging Face model repo: &lt;a href="https://huggingface.co/zai-org/GLM-5.2" rel="noopener noreferrer"&gt;https://huggingface.co/zai-org/GLM-5.2&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;OpenRouter GLM 5.2 model page: &lt;a href="https://openrouter.ai/z-ai/glm-5.2" rel="noopener noreferrer"&gt;https://openrouter.ai/z-ai/glm-5.2&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;OpenRouter API rate-limit reference: &lt;a href="https://openrouter.ai/docs/api/reference/limits" rel="noopener noreferrer"&gt;https://openrouter.ai/docs/api/reference/limits&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Z.ai GLM-5.2 developer overview: &lt;a href="https://docs.z.ai/guides/llm/glm-5-2" rel="noopener noreferrer"&gt;https://docs.z.ai/guides/llm/glm-5-2&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Z.ai web chat: &lt;a href="https://chat.z.ai/" rel="noopener noreferrer"&gt;https://chat.z.ai/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Z.ai Coding Plan subscription: &lt;a href="https://z.ai/subscribe" rel="noopener noreferrer"&gt;https://z.ai/subscribe&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;ofox managed GLM 5.2 model page: &lt;a href="https://ofox.ai/models/z-ai/glm-5.2" rel="noopener noreferrer"&gt;https://ofox.ai/models/z-ai/glm-5.2&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The pattern with every "is it free" question about a frontier model is the same: the weights or a demo are free, the compute never is. GLM 5.2 is a clean case, with MIT weights you can genuinely download and fork, a free browser chat to try it, and a hard floor of paid tokens or serious hardware the moment you need it programmatically. Anyone offering the API side at zero cost is either shifting the bill to your users or making it up.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/glm-5-2-free-zero-cost-paths-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>glm</category>
      <category>localllm</category>
      <category>openweights</category>
    </item>
    <item>
      <title>GPT-5.6 Terra vs GPT-5.5 (2026): Half Price, Same Coding?</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Fri, 10 Jul 2026 07:31:59 +0000</pubDate>
      <link>https://dev.to/owen_fox/gpt-56-terra-vs-gpt-55-2026-half-price-same-coding-3lbj</link>
      <guid>https://dev.to/owen_fox/gpt-56-terra-vs-gpt-55-2026-half-price-same-coding-3lbj</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR.
&lt;/h2&gt;

&lt;p&gt;On ofox, GPT-5.6 Terra lists at &lt;strong&gt;$2.50 input / $15 output&lt;/strong&gt; per million tokens. GPT-5.5 lists at &lt;strong&gt;$5 / $30&lt;/strong&gt;. Every rate on Terra, including the $0.25/M cache read, is exactly half of GPT-5.5, so Terra runs a flat &lt;strong&gt;2.0x cheaper&lt;/strong&gt; at any workload mix. At 100K requests per day on 3K-token prompts, that is roughly &lt;strong&gt;$2,000/day on Terra versus $4,000/day on GPT-5.5&lt;/strong&gt;, about &lt;strong&gt;$60,000 vs $120,000 per month&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The catch: OpenAI published no Terra-specific coding benchmark. The famous 91.9% Terminal-Bench number is Sol in Ultra mode, and even flagship Sol loses to Claude Fable 5 on SWE-Bench Pro (64.6% vs 80%). You are buying Terra on price, not on a proven Terra score.&lt;/p&gt;

&lt;p&gt;Both models sit on the same endpoint at &lt;a href="https://ofox.ai/en" rel="noopener noreferrer"&gt;ofox.ai&lt;/a&gt;, so the comparison is a one-line swap you can run on your own tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The interesting thing about Terra is how boring its pricing is.
&lt;/h2&gt;

&lt;p&gt;Half of GPT-5.5 on input, half on output, half on cache. No asterisks. That uniformity kills the usual pricing debate, because caching and workload shape cannot move a ratio that is 2.0x on every line.&lt;/p&gt;

&lt;p&gt;Which means the entire decision collapses to one question: is Terra good enough for the work you would otherwise send to GPT-5.5? That question does not have a clean benchmark answer yet, and this post is mostly about how to answer it for yourself instead of trusting the launch-day numbers.&lt;/p&gt;

&lt;p&gt;If you want to skip the reading and just try both, &lt;a href="https://ofox.ai/en" rel="noopener noreferrer"&gt;ofox.ai&lt;/a&gt; hosts &lt;code&gt;openai/gpt-5.6-terra&lt;/code&gt; and &lt;code&gt;openai/gpt-5.5&lt;/code&gt; on the same OpenAI-compatible key, pay-as-you-go, no monthly fee. The A/B harness at the end is under 15 lines. Every price in this post was verified against the ofox model catalog on July 10, 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR: Which One Should You Pick?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Pick&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cost-sensitive batch coding agents&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Terra&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Flat 2.0x cheaper, same 1M context and 128K output cap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output-heavy code generation&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Terra&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Output token is $15/M vs $30/M, and output dominates agent bills&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;High-volume classification / chat glue&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Luna&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$1/$6 undercuts both; use Terra only where you need more capability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Workload with a passing GPT-5.5 eval you must not regress&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;GPT-5.5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Terra has no published parity score; keep the known-good tier until your eval clears Terra&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hardest agentic problems, budget no object&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Sol (Ultra)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;91.9% Terminal-Bench, but Ultra is non-default and compute-heavy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-Bench-Pro-style hard patches&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Consider Claude Fable 5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;It leads Sol 80% vs 64.6% on that benchmark&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The honest verdict for most 2026 coding teams:
&lt;/h2&gt;

&lt;p&gt;Default your cost-sensitive traffic to &lt;code&gt;openai/gpt-5.6-terra&lt;/code&gt;, keep &lt;code&gt;openai/gpt-5.5&lt;/code&gt; as the fallback for any pipeline where you already have a passing eval you cannot afford to regress, and run a real A/B before you flip the default. Terra is very likely the right call on price. It is not yet the right call on evidence, and those are different things.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Each Model Ships on ofox
&lt;/h2&gt;

&lt;p&gt;Both models live on &lt;a href="https://ofox.ai/en/docs/api" rel="noopener noreferrer"&gt;api.ofox.ai/v1&lt;/a&gt; under the OpenAI-compatible protocol, and on the Anthropic-protocol endpoint for Claude Code drop-in use. The numbers, verified against the ofox model catalog on July 10, 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Spec&lt;/th&gt;
&lt;th&gt;GPT-5.6 Terra&lt;/th&gt;
&lt;th&gt;GPT-5.5&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Listed on ofox&lt;/td&gt;
&lt;td&gt;July 9, 2026 (GA)&lt;/td&gt;
&lt;td&gt;April 24, 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ofox model ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;openai/gpt-5.6-terra&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;openai/gpt-5.5&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Detail page&lt;/td&gt;
&lt;td&gt;&lt;a href="https://ofox.ai/models/openai/gpt-5.6-terra" rel="noopener noreferrer"&gt;ofox.ai/models/openai/gpt-5.6-terra&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://ofox.ai/models/openai/gpt-5.5" rel="noopener noreferrer"&gt;ofox.ai/models/openai/gpt-5.5&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input price&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$2.50 / M tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$5.00 / M tokens&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output price&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$15.00 / M tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$30.00 / M tokens&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cache read price&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.25 / M tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.50 / M tokens&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Web search add-on&lt;/td&gt;
&lt;td&gt;$0.01 / request&lt;/td&gt;
&lt;td&gt;$0.01 / request&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context window&lt;/td&gt;
&lt;td&gt;1,000,000 tokens&lt;/td&gt;
&lt;td&gt;1,000,000 tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maximum output&lt;/td&gt;
&lt;td&gt;128,000 tokens&lt;/td&gt;
&lt;td&gt;128,000 tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provider backing&lt;/td&gt;
&lt;td&gt;Azure (OpenAI via Microsoft)&lt;/td&gt;
&lt;td&gt;Azure (OpenAI via Microsoft)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three things stand out. The price cut is uniform. Input, output, and cache are all halved, so unlike a cross-vendor comparison where input and output discounts differ and the ratio wobbles with workload shape, Terra is a clean 2.0x everywhere. The spec envelope is identical too: same 1M context, same 128K output ceiling, same Azure backing. Neither model lets you emit a larger single-call patch than the other, so on long refactor jobs the deciding factor is per-token cost and capability, never output capacity. And the two GPT-5.6 tiers above Terra do not change this page. Sol sits at $5/$30, identical sticker to GPT-5.5, and Luna sits at $1/$6 below both. Terra is the tier that actually reprices the GPT-5.5 workload.&lt;/p&gt;

&lt;p&gt;For where Terra and GPT-5.5 sit against the open-weight field, see the &lt;a href="https://ofox.ai/blog/glm-5-2-vs-gpt-5-5-cost-2026/" rel="noopener noreferrer"&gt;GLM-5.2 vs GPT-5.5 cost breakdown&lt;/a&gt; and the &lt;a href="https://ofox.ai/blog/minimax-m3-vs-gpt-5-5-coding-benchmark-2026/" rel="noopener noreferrer"&gt;MiniMax M3 vs GPT-5.5 coding benchmark&lt;/a&gt;. For the flagship-versus-flagship picture, the &lt;a href="https://ofox.ai/blog/claude-fable-5-vs-opus-4-8-vs-gpt-5-5-swe-bench-2026/" rel="noopener noreferrer"&gt;Fable 5 vs Opus 4.8 vs GPT-5.5 SWE-Bench comparison&lt;/a&gt; covers the Claude side.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Honest Benchmark Read: What Terra Actually Proved at Launch
&lt;/h2&gt;

&lt;p&gt;This is the section the flagship-review posts skip, so read it before you trust any number.&lt;/p&gt;

&lt;p&gt;At GA on July 9, 2026, OpenAI benchmarked &lt;strong&gt;Sol&lt;/strong&gt;, the flagship tier. Terra and Luna got one line between them: they outperform Claude Fable 5 on Agents' Last Exam at around one-sixteenth the cost. No effort level, no absolute number, no Terra-vs-GPT-5.5 coding score. The benchmark table everyone is quoting belongs to Sol, which costs the same as GPT-5.5, not to the half-price tier this post is about.&lt;/p&gt;

&lt;p&gt;The two cleanest rows come from Simon Willison's GA-day writeup, one consistent source:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark (source: Simon Willison, GA day)&lt;/th&gt;
&lt;th&gt;GPT-5.6 Sol&lt;/th&gt;
&lt;th&gt;GPT-5.6 Terra&lt;/th&gt;
&lt;th&gt;Claude Fable 5&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Agents' Last Exam&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;53.6&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;no absolute score; "beats Fable 5 at ~1/16 the cost"&lt;/td&gt;
&lt;td&gt;~40.5 (derived: 53.6 minus 13.1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SWE-Bench Pro&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;64.6%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;not published&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;80%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Read the Agents' Last Exam line precisely, because loose paraphrases of it are already circulating. Sol scores 53.6, and even at medium reasoning it beats Fable 5 by 11.4 points at roughly one-quarter the cost. That medium-reasoning, quarter-cost result is &lt;strong&gt;Sol's&lt;/strong&gt;. The separate Terra and Luna claim is that they beat Fable 5 at around one-sixteenth the cost, with no effort level and no published number. So Terra's public evidence is a cost comparison, not a coding score. For a cost article that is the stronger pitch, as long as nobody dresses it up as a verified benchmark.&lt;/p&gt;

&lt;h3&gt;
  
  
  Terminal-Bench 2.1 is where launch posts quietly mix sources, so split it by who measured what:
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Terminal-Bench 2.1&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Sol (base)&lt;/td&gt;
&lt;td&gt;~88.8%&lt;/td&gt;
&lt;td&gt;OpenAI vendor-reported, own harness&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Sol (Ultra)&lt;/td&gt;
&lt;td&gt;~91.9%&lt;/td&gt;
&lt;td&gt;OpenAI vendor-reported, Ultra is non-default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.5 (Codex CLI)&lt;/td&gt;
&lt;td&gt;~83.4%&lt;/td&gt;
&lt;td&gt;tbench.ai public board, read July 10, 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Fable 5 (Claude Code)&lt;/td&gt;
&lt;td&gt;~83.1%&lt;/td&gt;
&lt;td&gt;tbench.ai public board, read July 10, 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 (any tier)&lt;/td&gt;
&lt;td&gt;not listed yet&lt;/td&gt;
&lt;td&gt;tbench.ai public board, read July 10, 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Do not compare across those two blocks. OpenAI's own harness puts Sol near 89 to 92; the independent tbench.ai board tops out around GPT-5.5 at 83.4 and Fable 5 at 83.1, and lists no GPT-5.6 tier yet. A third harness, vals.ai, scores Fable 5 at 80.5% in our &lt;a href="https://ofox.ai/blog/claude-fable-5-vs-sonnet-5-2026/" rel="noopener noreferrer"&gt;Fable 5 vs Sonnet 5 comparison&lt;/a&gt;. Three harnesses, three numbers for the same models. Rank within a source, never across it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four reads on all of this:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The 91.9% is Ultra, not default.&lt;/strong&gt; Ultra is a compute-intensive high-effort mode on Sol that spends far more tokens and latency per request. It is vendor-reported, and it is the number every headline uses. Base Sol lands a few points lower, and neither figure is confirmed on the independent board yet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Even the vendor numbers deserve a discount.&lt;/strong&gt; METR's predeployment evaluation (metr.org, June 2026) found Sol's detected cheating rate, where the model exploits bugs in the eval environment instead of solving the task, was the highest of any public model on their agent harness. Counting those attempts one way versus another swings Sol's time-horizon estimate from about 11 hours to over 270, a spread METR itself calls statistically uninterpretable. When the model topping the coding charts is also the one most prone to gaming the eval, "trust your own tasks, not the launch number" stops being a slogan.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The family loses a benchmark too.&lt;/strong&gt; On SWE-Bench Pro, flagship Sol scored 64.6% against Claude Fable 5's 80%. OpenAI's counter-argument is that roughly 30% of SWE-Bench Pro tasks are broken, a fair critique and also an admission the number is not flattering. If your hard-patch workload looks like SWE-Bench Pro, GPT-5.6 is not the obvious pick at any tier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Terra is undocumented.&lt;/strong&gt; The strongest public claim about Terra is a cost comparison on one benchmark with no score attached. That is thin evidence to reroute a production pipeline, and plenty of reason to run an A/B, given the price is half.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The practical conclusion:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Treat Terra as a cost bet with an unproven-but-plausible capability floor.&lt;/strong&gt; The plausibility comes from it being the same family and architecture as Sol, one tier down. The lack of proof comes from OpenAI simply not publishing a Terra coding score. You close that gap with your own eval, which is cheap because Terra is cheap. The rest of this post is the math for the cost bet and the harness for the eval.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real Per-Token Math: Three Workload Scenarios
&lt;/h2&gt;

&lt;p&gt;Sticker pricing is easy. The number that matters is the invoice at your scale. Three scenarios across the volume range teams actually hit.&lt;/p&gt;

&lt;h3&gt;
  
  
  Assumption block (held constant across all three):
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  3,000 tokens per request, split 2:1 input to output (2K in, 1K out)&lt;/li&gt;
&lt;li&gt;  30 days per month&lt;/li&gt;
&lt;li&gt;  No cache hits in the headline number (cache is covered in the next section)&lt;/li&gt;
&lt;li&gt;  Web search add-on excluded&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Light: 10K requests per day
&lt;/h3&gt;

&lt;p&gt;Roughly a small team running one coding agent at moderate intensity, or a side project at scale.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Daily input tokens: 10K x 2K = 20M&lt;/li&gt;
&lt;li&gt;  Daily output tokens: 10K x 1K = 10M&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Input cost / day&lt;/th&gt;
&lt;th&gt;Output cost / day&lt;/th&gt;
&lt;th&gt;Total / day&lt;/th&gt;
&lt;th&gt;Total / month&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Terra&lt;/td&gt;
&lt;td&gt;20M x $2.50 = &lt;strong&gt;$50&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;10M x $15 = &lt;strong&gt;$150&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$200&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$6,000&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.5&lt;/td&gt;
&lt;td&gt;20M x $5.00 = &lt;strong&gt;$100&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;10M x $30 = &lt;strong&gt;$300&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$400&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$12,000&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Difference&lt;/td&gt;
&lt;td&gt;$200/day&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$6,000/month&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Mid: 100K requests per day
&lt;/h3&gt;

&lt;p&gt;A 10-engineer team running coding agents full time, or a product feature exposing the model to end users at moderate concurrency.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Daily input tokens: 100K x 2K = 200M&lt;/li&gt;
&lt;li&gt;  Daily output tokens: 100K x 1K = 100M&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Input cost / day&lt;/th&gt;
&lt;th&gt;Output cost / day&lt;/th&gt;
&lt;th&gt;Total / day&lt;/th&gt;
&lt;th&gt;Total / month&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Terra&lt;/td&gt;
&lt;td&gt;200M x $2.50 = &lt;strong&gt;$500&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;100M x $15 = &lt;strong&gt;$1,500&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$2,000&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$60,000&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.5&lt;/td&gt;
&lt;td&gt;200M x $5.00 = &lt;strong&gt;$1,000&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;100M x $30 = &lt;strong&gt;$3,000&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$4,000&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$120,000&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Difference&lt;/td&gt;
&lt;td&gt;$2,000/day&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$60,000/month&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Heavy: 1M requests per day
&lt;/h3&gt;

&lt;p&gt;A production agent fleet, a developer-tooling SaaS at scale, or an internal platform exposed to a four-figure-engineer org.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Daily input tokens: 1M x 2K = 2B&lt;/li&gt;
&lt;li&gt;  Daily output tokens: 1M x 1K = 1B&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Input cost / day&lt;/th&gt;
&lt;th&gt;Output cost / day&lt;/th&gt;
&lt;th&gt;Total / day&lt;/th&gt;
&lt;th&gt;Total / month&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Terra&lt;/td&gt;
&lt;td&gt;2B x $2.50 = &lt;strong&gt;$5,000&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;1B x $15 = &lt;strong&gt;$15,000&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$20,000&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$600,000&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.5&lt;/td&gt;
&lt;td&gt;2B x $5.00 = &lt;strong&gt;$10,000&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;1B x $30 = &lt;strong&gt;$30,000&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$40,000&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$1,200,000&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Difference&lt;/td&gt;
&lt;td&gt;$20,000/day&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$600,000/month&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The &lt;strong&gt;2.0x ratio holds at every volume tier&lt;/strong&gt;, and unlike a cross-vendor comparison it holds at every workload mix too. At 1:1 (chat-style turns) Terra is still exactly half. At 1:3 output-heavy (code generation from a short prompt) it is still exactly half. The reason is arithmetic: when every rate is halved, the blend of those rates is halved regardless of the weights. This is worth internalizing, because it means you never have to model your input-to-output mix to predict the savings. Whatever GPT-5.5 costs you today, Terra costs half, full stop.&lt;/p&gt;

&lt;h3&gt;
  
  
  Per-task view, since that is how coding bills actually read
&lt;/h3&gt;

&lt;p&gt;A single multi-turn agentic task tends to burn far more than 3K tokens. Take a realistic shape: 50K input (repo context, tool results, several turns) and 15K output (edits, explanations, retries).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Per task&lt;/th&gt;
&lt;th&gt;1K tasks/day&lt;/th&gt;
&lt;th&gt;Monthly (30d)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Terra&lt;/td&gt;
&lt;td&gt;50K x $2.50/M + 15K x $15/M = &lt;strong&gt;$0.35&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$350&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$10,500&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.5&lt;/td&gt;
&lt;td&gt;50K x $5/M + 15K x $30/M = &lt;strong&gt;$0.70&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$700&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$21,000&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;At $0.35 versus $0.70 a task, the question is not whether the savings are real. They are, and they are exactly double. The question is whether Terra's output on those 1,000 tasks is close enough to GPT-5.5's that the halved bill is a free lunch rather than a quality cut you pay for elsewhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cache Changes the Dollars, Not the Ratio
&lt;/h2&gt;

&lt;p&gt;Both models bill cache reads below full input rate: Terra at $0.25/M, GPT-5.5 at $0.50/M. Cache hit rates above 50% are realistic for code-review agents that reuse the same repo context across requests. Here is 50% input cache hit on the blended 2:1 cost.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Uncached input ($/M)&lt;/th&gt;
&lt;th&gt;Cached input ($/M)&lt;/th&gt;
&lt;th&gt;Effective input ($/M)&lt;/th&gt;
&lt;th&gt;Output ($/M)&lt;/th&gt;
&lt;th&gt;Blended ($/M) at 2:1&lt;/th&gt;
&lt;th&gt;Drop vs no cache&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Terra&lt;/td&gt;
&lt;td&gt;$2.50&lt;/td&gt;
&lt;td&gt;$0.25&lt;/td&gt;
&lt;td&gt;$1.375&lt;/td&gt;
&lt;td&gt;$15.00&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$5.92&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;−11.2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.5&lt;/td&gt;
&lt;td&gt;$5.00&lt;/td&gt;
&lt;td&gt;$0.50&lt;/td&gt;
&lt;td&gt;$2.75&lt;/td&gt;
&lt;td&gt;$30.00&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$11.83&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;−11.2%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Note the two "drop vs no cache" figures are identical at −11.2%, and Terra's blended $5.92 is exactly half of GPT-5.5's $11.83. This is the uniform-discount property again. Because Terra's cache rate is also exactly half, caching cannot tilt the comparison one way or the other. It lowers both bills by the same percentage and leaves the 2.0x ratio untouched at every cache hit rate from 0% to 100%.&lt;/p&gt;

&lt;p&gt;That is a genuinely different result from the usual model comparison, where cache economics favor one model and shift the crossover point. Here, cache is a red herring for the decision. Turn it on for the absolute savings, but do not let anyone argue that caching changes which model is cheaper. It does not, and it cannot.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Terra Is the Right Call
&lt;/h2&gt;

&lt;p&gt;Five workloads where routing to &lt;code&gt;openai/gpt-5.6-terra&lt;/code&gt; is the obvious move, assuming your eval clears it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Batch and async coding sweeps.&lt;/strong&gt; Overnight dependency upgrades, doc generation, batched lint and codemod runs. Total token spend dominates and individual latency does not matter. The 2.0x gap compounds across thousands of nightly requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Output-heavy generation pipelines.&lt;/strong&gt; Test generation, scaffolding, codemod application, anything that emits more than it reads. Output is the expensive half of every bill, and Terra halves it to $15/M.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Long-context refactor passes.&lt;/strong&gt; Terra's 1M context and 128K output cap match GPT-5.5 exactly, so you lose no capacity and pay half per token on the large input a whole-module prompt requires.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;High-cache-hit review agents.&lt;/strong&gt; Same repo context across many requests. The absolute savings are real even though the ratio is unchanged, and Terra's $0.25/M cache read is the lowest of the two.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost-capped internal tooling.&lt;/strong&gt; Internal agents where the budget is fixed and the quality bar is "clearly helpful," not "flagship-grade." Terra doubles the requests you can afford under the same cap.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The honest qualifier, one more time: every item above is conditional on &lt;strong&gt;your&lt;/strong&gt; eval, not OpenAI's benchmarks, because OpenAI did not benchmark Terra for coding. The cost case is proven. The quality case is yours to run.&lt;/p&gt;

&lt;h2&gt;
  
  
  When GPT-5.5 Still Earns Its Keep
&lt;/h2&gt;

&lt;p&gt;Three situations where the known quantity beats the cheaper unknown:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;You have a passing GPT-5.5 eval you cannot regress.&lt;/strong&gt; If a production pipeline already meets a quality bar on GPT-5.5 and a regression is expensive (customer-facing output, compliance-sensitive generation), keep GPT-5.5 as the default until Terra clears the same eval offline. The half-price saving is not worth a silent quality drop you discover in production.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interactive latency is the KPI.&lt;/strong&gt; Pair-programming surfaces where first-token latency drives adoption. GPT-5.5 has a long-tuned latency profile on short prompts. Terra may match it, but "may" is not what you want under a latency SLO you already hit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Frozen model contracts.&lt;/strong&gt; Some teams pin a model version for reproducibility or audit reasons and change it only on a schedule. If you are mid-cycle on GPT-5.5, the right time to evaluate Terra is your next review window, not the day it launches.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There is also the case for going &lt;strong&gt;up&lt;/strong&gt; rather than sideways. If your hard-problem escalation path matters more than your average cost, Sol Ultra's 91.9% Terminal-Bench figure or Claude Fable 5's 80% SWE-Bench Pro lead may be worth more than Terra's savings. Route the cheap bulk to Terra and escalate the hardest 10% to whichever model wins your eval on the hard set. That two-tier split is almost always better than picking one model for everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  When NOT to Pick Either
&lt;/h2&gt;

&lt;p&gt;If your workload is high-volume, latency-sensitive, and capability-light (classification, routing, short chat glue, extraction), both Terra and GPT-5.5 are overkill. &lt;code&gt;openai/gpt-5.6-luna&lt;/code&gt; at $1/$6 undercuts Terra by another 2.5x on input, and the capability tier is sufficient for structured, bounded tasks. And if you are optimizing purely for cost per token on general coding and can tolerate an open-weight model, the &lt;a href="https://ofox.ai/blog/glm-5-2-vs-gpt-5-5-cost-2026/" rel="noopener noreferrer"&gt;GLM-5.2 cost comparison&lt;/a&gt; shows a model that undercuts even Terra on the sticker. Pick Terra when you specifically want GPT-5.6-family behavior at half the flagship price, not when you want the cheapest possible token.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Run the Eval OpenAI Skipped
&lt;/h2&gt;

&lt;p&gt;Because there is no published Terra coding score, the eval falls to you. It is a half-day of work and it is the only thing that turns "half the price" into a defensible routing decision. A workable process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Pull 20 to 30 real tasks from your logs, not toy prompts. The value of an eval comes entirely from it looking like production. Include the ugly ones: multi-file edits, ambiguous requirements, tasks where GPT-5.5 currently struggles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run each task through both &lt;code&gt;openai/gpt-5.6-terra&lt;/code&gt; and &lt;code&gt;openai/gpt-5.5&lt;/code&gt; with the harness below. Capture the output, the token count, and the latency for every run.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Score on the dimensions you actually ship on, not a vibe. For coding that usually means: does it compile or pass tests, does it follow the instruction precisely, does it avoid inventing APIs, and how much cleanup did the diff need. A 1-to-5 scale per dimension is enough.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set a regression threshold before you look at results, so you are not rationalizing after the fact. A reasonable bar: Terra ships as the default if it lands within one point of GPT-5.5 on your worst dimension across the set, since the payoff is a halved bill.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Split rather than switch. Even if Terra loses overall, it usually wins on a subset (the routine, well-specified tasks). Route those to Terra and keep the hard tail on GPT-5.5 or escalate it upward. A two-tier split captures most of the savings without the risk of a blanket swap.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The reason this matters more for Terra than for a typical model launch is the specific shape of the evidence. OpenAI gave you a flagship benchmark and a one-line relative claim, and priced the tier you care about at exactly half. That pricing is a strong signal that Terra is meant to absorb the GPT-5.5 workload, but a signal is not a measurement. Thirty tasks and an afternoon converts it into one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try Both via ofox: A/B in 10 Lines of Code
&lt;/h2&gt;

&lt;p&gt;Both &lt;code&gt;openai/gpt-5.6-terra&lt;/code&gt; and &lt;code&gt;openai/gpt-5.5&lt;/code&gt; are live on &lt;code&gt;https://api.ofox.ai/v1&lt;/code&gt; under the OpenAI-compatible protocol. The swap is one string. Since Terra has no published coding score, this harness is not optional. It is the only honest input to the routing decision.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python: A/B both models in one loop
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.ofox.ai/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OFOX_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Refactor this Python function to use async/await and return early on empty input: ...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;openai/gpt-5.6-terra&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;openai/gpt-5.5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="n"&gt;t0&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;elapsed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;t0&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;elapsed&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;s, &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;total_tokens&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; tokens&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gives you raw latency, total token count, and side-by-side output on your own task. Run it across 20-30 representative cases from your real workload. That set, scored by you, beats every launch benchmark for deciding where to route.&lt;/p&gt;

&lt;h3&gt;
  
  
  Node: same shape
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;OpenAI&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;openai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;baseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.ofox.ai/v1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OFOX_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Refactor this Python function to use async/await and return early on empty input: ...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;openai/gpt-5.6-terra&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;openai/gpt-5.5&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;t0&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="p"&gt;${(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;t0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;s, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;total_tokens&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; tokens`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Production routing: single-line model swap
&lt;/h3&gt;

&lt;p&gt;Once your eval clears Terra, routing the cost-sensitive default to it and keeping GPT-5.5 for the pipelines that must not regress is one function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;pick_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;request_type&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;batch_refactor&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;code_review&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;doc_generation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;openai/gpt-5.6-terra&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;openai/gpt-5.5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;pick_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request_type&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same SDK, same key, same billing line. The model column on your invoice tells you what each request cost, and the routing function is the one place to tune the split. For the broader pattern of routing across the full ofox catalog, including Claude for escalations, see the &lt;a href="https://ofox.ai/blog/30-dollar-ai-coding-stack-setup-guide-2026/" rel="noopener noreferrer"&gt;$30 AI coding stack guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://ofox.ai/models/openai/gpt-5.6-terra" rel="noopener noreferrer"&gt;ofox.ai model catalog: openai/gpt-5.6-terra&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://ofox.ai/models/openai/gpt-5.5" rel="noopener noreferrer"&gt;ofox.ai model catalog: openai/gpt-5.5&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://simonwillison.net/2026/Jul/9/gpt-5-6/" rel="noopener noreferrer"&gt;Simon Willison: the new GPT-5.6 family (Luna, Terra, Sol)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.tbench.ai/leaderboard" rel="noopener noreferrer"&gt;Terminal-Bench leaderboard (tbench.ai)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://metr.org/blog/2026-06-26-gpt-5-6-sol/" rel="noopener noreferrer"&gt;METR: predeployment evaluation of GPT-5.6 Sol&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/laude-institute/terminal-bench" rel="noopener noreferrer"&gt;Terminal-Bench project (laude-institute)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://ofox.ai/blog/claude-fable-5-vs-sonnet-5-2026/" rel="noopener noreferrer"&gt;Fable 5 vs Sonnet 5 comparison&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://ofox.ai/blog/glm-5-2-vs-gpt-5-5-cost-2026/" rel="noopener noreferrer"&gt;GLM-5.2 vs GPT-5.5 cost breakdown&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://ofox.ai/blog/minimax-m3-vs-gpt-5-5-coding-benchmark-2026/" rel="noopener noreferrer"&gt;MiniMax M3 vs GPT-5.5 coding benchmark&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The pricing case for Terra is settled: it is exactly half of GPT-5.5 on every line item, at every volume, at every cache rate. The capability case is not settled, because OpenAI never published a Terra coding score. Run the 20-line A/B before you route production traffic, and let your own eval, not the launch headline, decide whether half the price comes with the same output.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/gpt-5-6-terra-vs-gpt-5-5-coding-cost-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>openai</category>
      <category>pricing</category>
      <category>modelcomparison</category>
    </item>
    <item>
      <title>GPT-5.6 Model Not Available? 6 Causes and Fixes (2026)</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Fri, 10 Jul 2026 07:27:39 +0000</pubDate>
      <link>https://dev.to/owen_fox/gpt-56-model-not-available-6-causes-and-fixes-2026-2cl3</link>
      <guid>https://dev.to/owen_fox/gpt-56-model-not-available-6-causes-and-fixes-2026-2cl3</guid>
      <description>&lt;p&gt;&lt;strong&gt;GPT-5.6 is live, so a "model not available" error almost never means the model is gone.&lt;/strong&gt; It means one of six specific things is wrong between your request and OpenAI's router, and five of the six are fixable in under a minute. The single most common cause has nothing to do with access: you called the bare &lt;code&gt;gpt-5.6&lt;/code&gt; ID on a gateway that wants an explicit tier.&lt;/p&gt;

&lt;h2&gt;
  
  
  GPT-5.6 Model Not Available? The 30-Second Diagnosis
&lt;/h2&gt;

&lt;p&gt;Run these three checks in order. Most people are fixed by the first one.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Check&lt;/th&gt;
&lt;th&gt;If it fails&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Did you call &lt;code&gt;gpt-5.6&lt;/code&gt; (bare) instead of &lt;code&gt;gpt-5.6-sol&lt;/code&gt; / &lt;code&gt;gpt-5.6-terra&lt;/code&gt; / &lt;code&gt;gpt-5.6-luna&lt;/code&gt;?&lt;/td&gt;
&lt;td&gt;Switch to an explicit tier ID and retry. Fixes the majority of gateway 404s.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Does &lt;code&gt;GET /v1/models&lt;/code&gt; list the tier ID for your key?&lt;/td&gt;
&lt;td&gt;If absent, this is an access problem, not a naming problem. Go to Cause 2 and 3.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Are you behind a VPN or proxy?&lt;/td&gt;
&lt;td&gt;Disconnect and retry. Region blocks surface as this exact error.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Quick fix for the common case: change your model string to &lt;code&gt;gpt-5.6-sol&lt;/code&gt; (OpenAI direct) or &lt;code&gt;openai/gpt-5.6-sol&lt;/code&gt; (on a gateway like ofox) and rerun. If the models-list check shows the ID is missing entirely, skip to the access causes below.&lt;/p&gt;

&lt;p&gt;The same three checks as a decision tree:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowchart TD
    A[GPT-5.6 model not available] --&amp;gt; B{Called bare gpt-5.6?}
    B --&amp;gt;|Yes| C[Use gpt-5.6-sol / -terra / -luna] --&amp;gt; Z[Retry]
    B --&amp;gt;|No| D{Tier ID in GET /v1/models?}
    D --&amp;gt;|Yes| E[Request problem: model string, endpoint, or org header] --&amp;gt; Z
    D --&amp;gt;|No| F{Behind a VPN or proxy?}
    F --&amp;gt;|Yes| G[Disconnect and retry] --&amp;gt; Z
    F --&amp;gt;|No| H{Within 24h of GA?}
    H --&amp;gt;|Yes| I[Rollout lag: wait and recheck, or switch gateway]
    H --&amp;gt;|No| J[Access scope: check org, workspace, account, verification]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The branch that catches most people is the very first one. If you have never had to think about which GPT-5.6 tier you want, you are probably sending the bare ID, and that is the fastest thing to rule out.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Fix, When to Wait, and When to Switch
&lt;/h2&gt;

&lt;p&gt;Not every "model not available" is worth debugging on your side. Match your situation to one of three responses before you sink time into it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix it in your own code&lt;/strong&gt; when the models-list endpoint shows the tier ID. That means the model exists for your key, so the error is a naming, endpoint, or org-header problem you own, and it is a one-line change. This is the case most people are in and do not realize, because the error text ("does not exist or you do not have access") makes it sound like an availability problem when the model is sitting right there in your list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wait it out&lt;/strong&gt; when it is July 9 or 10, 2026 and the ID is missing from your list. The general-availability rollout propagated over roughly 24 hours, so a missing ID in the first day is usually the rollout not having reached your org rather than anything wrong with your account. Recheck the models list every hour or two before you open a support ticket, because a ticket filed during the rollout window just gets a "please wait for rollout" reply.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Switch upstream&lt;/strong&gt; when you need the model in production today and cannot wait for your own org's grant. A gateway that already lists all three tiers unblocks you immediately, and there is no reason to hold a launch for a rollout you do not control. You can always cut back to your direct key once your org catches up, because the call shape is identical.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stop rule:&lt;/strong&gt; if &lt;code&gt;GET /v1/models&lt;/code&gt; lists the tier ID and you are not behind a VPN, the problem is in your request (model string, endpoint, or org header), not OpenAI's availability. Do not file a support ticket until you have confirmed those three, because support will ask you to confirm exactly those three first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Error: 404 model_not_found vs 403 no-access
&lt;/h2&gt;

&lt;p&gt;Two different HTTP statuses hide behind the same "model not available" feeling, and they mean different things.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Error code&lt;/th&gt;
&lt;th&gt;What it actually means&lt;/th&gt;
&lt;th&gt;Where to look&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;404&lt;/td&gt;
&lt;td&gt;&lt;code&gt;model_not_found&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The model ID string does not resolve for this key. Either the ID is wrong, or your key genuinely has no access.&lt;/td&gt;
&lt;td&gt;Model string first, then access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;403&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;access_denied&lt;/code&gt; / permission&lt;/td&gt;
&lt;td&gt;The ID resolves but your project or org is not permitted to call it.&lt;/td&gt;
&lt;td&gt;Org/project/workspace scope&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;404 (disguised)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;model_not_found&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Region block. OpenAI returns a not-found rather than a clear geo error when the connection looks unsupported.&lt;/td&gt;
&lt;td&gt;VPN/proxy, then region&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;OpenAI's direct API returns this 404 body:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The model `gpt-5.6` does not exist or you do not have access to it."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"invalid_request_error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"param"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"model_not_found"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That message conflates two causes on purpose ("does not exist or you do not have access"). The models-list check in the diagnosis table is how you tell them apart: if the ID is in your list, it exists for you and the problem is your request. If it is absent, it is access.&lt;/p&gt;

&lt;p&gt;That JSON is the OpenAI-direct shape, and gateways wrap the same error in their own envelope, so the exact text is not portable. On ofox, the bare &lt;code&gt;openai/gpt-5.6&lt;/code&gt; returns &lt;code&gt;{"error":{"message":"Model 'openai/gpt-5.6' not found","type":"model_not_found","code":404}}&lt;/code&gt; — here the machine-readable &lt;code&gt;model_not_found&lt;/code&gt; lands in &lt;code&gt;type&lt;/code&gt;, and &lt;code&gt;code&lt;/code&gt; is the numeric HTTP status rather than the string the OpenAI-direct body puts there. Do not grep for one exact message: treat any 404 whose &lt;code&gt;code&lt;/code&gt; or &lt;code&gt;type&lt;/code&gt; contains &lt;code&gt;model_not_found&lt;/code&gt; as this same error.&lt;/p&gt;

&lt;p&gt;For the general version of this error across every OpenAI model, our OpenAI 404 model-does-not-exist guide breaks down all the non-GPT-5.6-specific causes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What GA Changed, and Why the Old "No Access" Advice Is Stale
&lt;/h2&gt;

&lt;p&gt;If you searched this error during GPT-5.6's preview and are reading old advice, throw the old advice out. The preview that ran from June 26, 2026 was gated: access was reviewed and granted to a limited set of accounts, so during those two weeks "model not available" usually did mean you were not on the list, and the only real fix was to request access and wait.&lt;/p&gt;

&lt;p&gt;General availability on July 9, 2026 flipped that. GPT-5.6 rolled out across ChatGPT, Codex, and the API globally, so a not-available error now almost never means you are locked out of a gated preview. It means one of the six mechanical causes below. This is the single most important reframing for debugging the error today: stop assuming you need special access, and start checking your model string, your org scope, and your region, because those are what actually break now.&lt;/p&gt;

&lt;p&gt;The practical test is still the models-list endpoint. During the gated preview, the tier IDs were absent for almost everyone and the fix was out of your hands. Post-GA, the IDs are present for the large majority of keys, which means the error has moved from "you cannot have this" to "your request is shaped wrong." That shift is why the fixes below are mostly one-line changes rather than access requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Six Causes, in Order of How Often They Hit
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Cause 1: You used the bare &lt;code&gt;gpt-5.6&lt;/code&gt; ID on a gateway that does not alias it
&lt;/h3&gt;

&lt;p&gt;This is the most common cause for anyone not calling OpenAI directly, and it is pure naming.&lt;/p&gt;

&lt;p&gt;OpenAI's own API aliases the bare &lt;code&gt;gpt-5.6&lt;/code&gt; to the Sol tier, so on the direct endpoint &lt;code&gt;gpt-5.6&lt;/code&gt; works and quietly routes to Sol. That alias is not portable. Multi-provider gateways, proxies, and routers generally require the explicit tier because they do not guess which tier you meant. On ofox, for instance, &lt;code&gt;openai/gpt-5.6&lt;/code&gt; returns 404, while &lt;code&gt;openai/gpt-5.6-sol&lt;/code&gt;, &lt;code&gt;openai/gpt-5.6-terra&lt;/code&gt;, and &lt;code&gt;openai/gpt-5.6-luna&lt;/code&gt; all resolve.&lt;/p&gt;

&lt;p&gt;The naming difference across providers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;You call&lt;/th&gt;
&lt;th&gt;OpenAI direct API&lt;/th&gt;
&lt;th&gt;ofox gateway&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;gpt-5.6&lt;/code&gt; (bare)&lt;/td&gt;
&lt;td&gt;Aliases to Sol (works)&lt;/td&gt;
&lt;td&gt;404, not aliased&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;gpt-5.6-sol&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Works&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;openai/gpt-5.6-sol&lt;/code&gt; works&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;gpt-5.6-terra&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Works&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;openai/gpt-5.6-terra&lt;/code&gt; works&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;gpt-5.6-luna&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Works&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;openai/gpt-5.6-luna&lt;/code&gt; works&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The fix and the habit: always pass the explicit tier. Relying on the bare alias means your code breaks the moment you move it behind any gateway, and it also makes your routing non-deterministic if OpenAI ever repoints the alias. Pick the tier you actually want and name it.&lt;/p&gt;

&lt;p&gt;What the failing and working calls look like. The bare ID against a gateway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 404 on a gateway that does not alias the bare ID&lt;/span&gt;
curl https://api.ofox.ai/v1/chat/completions &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$OFOX_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"model": "openai/gpt-5.6", "messages": [{"role":"user","content":"hi"}]}'&lt;/span&gt;
&lt;span class="c"&gt;# -&amp;gt; 404 {"error":{"message":"Model 'openai/gpt-5.6' not found","type":"model_not_found","code":404}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same call with an explicit tier resolves:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://api.ofox.ai/v1/chat/completions &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$OFOX_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"model": "openai/gpt-5.6-sol", "messages": [{"role":"user","content":"hi"}]}'&lt;/span&gt;
&lt;span class="c"&gt;# -&amp;gt; 200, routed to Sol&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In an SDK, the only thing that changes is the model string. Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# breaks behind a gateway, works on OpenAI direct (aliases to Sol)
&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-5.6&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;msgs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# portable everywhere: name the tier
&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-5.6-sol&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;msgs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Node is the same shape:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// portable: explicit tier&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gpt-5.6-terra&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;msgs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you maintain a shared config or a model registry, do a search for the literal string &lt;code&gt;gpt-5.6&lt;/code&gt; with no tier suffix and replace every one. That single sweep prevents the error from reappearing the next time the code runs behind a proxy or a gateway.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cause 2: The GA rollout has not reached your org yet
&lt;/h3&gt;

&lt;p&gt;GPT-5.6 went generally available on July 9, 2026, but OpenAI rolled it out globally over roughly 24 hours. During that window the same key could resolve the tier IDs in one region and 404 in another. If you are reading this within a day of GA and &lt;code&gt;GET /v1/models&lt;/code&gt; does not list the tiers, this is the likely cause and it resolves itself.&lt;/p&gt;

&lt;p&gt;What to do depends on how much the wait costs you. A solo developer or hobby project can just recheck the models list every couple of hours and do nothing else, since the grant will land on its own. A team on a paid API plan that cannot hold a launch should route through a gateway that already lists the tiers (see the Alternatives section) and cut back to the direct key once the org catches up. An enterprise account with several organizations should confirm which organization was granted access first, because the grant frequently lands on one org a few hours before the others, and a key from the wrong org 404s even though the account "has access."&lt;/p&gt;

&lt;p&gt;A subtle version of this cause: the model appears in your list but calls still 404 for a few minutes. That happens when the catalog entry propagates to the models endpoint before the routing layer is fully live in your region. If the ID is listed but the first call fails, wait five minutes and retry once before treating it as a real error.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cause 3: Access is enabled on a different org, workspace, or account
&lt;/h3&gt;

&lt;p&gt;Access is scoped per organization, per Codex workspace, and per account email. The person who can use GPT-5.6 in ChatGPT is not automatically the same identity as the API key making the call.&lt;/p&gt;

&lt;p&gt;Confirm three things line up:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The API call uses the organization ID that was granted access. If you belong to several orgs, set the &lt;code&gt;OpenAI-Organization&lt;/code&gt; header explicitly rather than relying on the default.&lt;/li&gt;
&lt;li&gt;The account email on the key matches the one that received the grant.&lt;/li&gt;
&lt;li&gt;If your access is for Codex specifically, confirm you are calling from the approved Codex workspace, not a general API key.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Setting the org explicitly removes the guesswork:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;organization&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;org-THE_ONE_WITH_ACCESS&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# not your default org
&lt;/span&gt;    &lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proj_...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                       &lt;span class="c1"&gt;# the project scoped to the grant
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-5.6-sol&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;msgs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To find which org actually holds the grant, list your organizations in the dashboard or call the models endpoint once per org header and see which one returns the tier IDs. The org that lists them is the one your production key should use. This is why GPT-5.6 can work in ChatGPT while the API 404s: same human, different scoped identity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cause 4: A VPN or proxy makes you look like an unsupported region
&lt;/h3&gt;

&lt;p&gt;OpenAI blocks connections that appear to originate from an unsupported country or region, and the block frequently surfaces as a model-not-available or access error rather than a clear geographic message. Corporate proxies and privacy VPNs both trigger it.&lt;/p&gt;

&lt;p&gt;Fix: disconnect the VPN or proxy and retry. If you must route through a proxy for compliance reasons, make sure its egress IP is in a supported region, or use a gateway whose upstream region is stable. This cause is easy to miss because the error text says nothing about geography.&lt;/p&gt;

&lt;p&gt;To confirm it is region and not something else, check the egress IP your requests actually leave from, not the IP of the machine you are typing on. Corporate networks often route outbound traffic through a gateway in a different country than your office, so a developer in a supported region can still hit the block because the company's egress node is somewhere else. A quick &lt;code&gt;curl https://api.ipify.org&lt;/code&gt; from the same host and network that makes the OpenAI call shows the IP OpenAI sees. If that IP resolves to an unsupported region, the model-not-available error is a geography problem wearing a naming-error costume, and no change to your model string will fix it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cause 5: Wrong endpoint for how GPT-5.6 exposes a feature
&lt;/h3&gt;

&lt;p&gt;GPT-5.6 ships programmatic tool calling through the Responses API. If your integration is built against chat-completions and you call a Responses-only feature, or you post to the wrong path, you can get an error that reads like the model is unavailable when the model is fine and the endpoint is wrong.&lt;/p&gt;

&lt;p&gt;Fix: confirm you are on the endpoint the feature requires. Plain text and standard chat calls work on the chat-completions shape; the newer programmatic tool-calling path uses the Responses API. Match the endpoint to the feature before assuming an access problem.&lt;/p&gt;

&lt;p&gt;A standard chat call stays on chat-completions and works fine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-5.6-sol&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;refactor this function ...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The programmatic tool-calling path moves to the Responses API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;responses&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-5.6-sol&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;refactor this function ...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;function&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;run_tests&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;parameters&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}}],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you copy a tool-calling snippet from the GPT-5.6 launch material into a chat-completions integration, the mismatch can read as a model or capability error. The model is available; the call is on the wrong surface. Keep the two paths separate in your code so a tool-calling change never masquerades as an availability problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cause 6: Tier or verification not enabled on your account
&lt;/h3&gt;

&lt;p&gt;Some accounts need identity or organization verification before frontier models unlock, and some usage tiers gate the newest models until a spend threshold is met. If the models list omits GPT-5.6 but includes older models, and you are past the GA rollout window, check your account's verification status and usage tier in the dashboard.&lt;/p&gt;

&lt;p&gt;Fix: complete any pending verification, or if you are blocked by a tier gate you cannot clear quickly, use a gateway that fronts the model on its own verified account (below).&lt;/p&gt;

&lt;p&gt;Two concrete things to check in the dashboard. First, organization verification: some accounts must complete an identity or organization verification step before the newest frontier models unlock, and until it is done those models are simply absent from the list while older ones work normally. Second, the usage tier: OpenAI's tiers step up with cumulative spend, and the very newest models sometimes land on higher tiers first. If your account is on an early tier and every GPT-5.6 tier is missing while GPT-5.5 is present, a tier gate is the likely reason. Neither of these is something you can fix in code, which is exactly why a gateway that already fronts the model on a verified, higher-tier account is the pragmatic unblock while you sort out your own account status.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Failure Patterns We See
&lt;/h2&gt;

&lt;p&gt;These are the shapes this error takes in real integrations, so you can pattern-match your own symptom.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Most likely cause&lt;/th&gt;
&lt;th&gt;First thing to try&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Works in ChatGPT, 404 in API&lt;/td&gt;
&lt;td&gt;Cause 3 (scoped identity)&lt;/td&gt;
&lt;td&gt;Set the org header, check account email&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Worked yesterday, 404 today on the same code&lt;/td&gt;
&lt;td&gt;Alias repointed or you moved behind a gateway&lt;/td&gt;
&lt;td&gt;Switch to explicit tier ID (Cause 1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;404 in one region, 200 in another, same key&lt;/td&gt;
&lt;td&gt;Cause 2 (rollout) or Cause 4 (region)&lt;/td&gt;
&lt;td&gt;Recheck models list; drop VPN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;gpt-5.6&lt;/code&gt; 404 but &lt;code&gt;gpt-5.5&lt;/code&gt; works&lt;/td&gt;
&lt;td&gt;Cause 1 (bare alias not supported here)&lt;/td&gt;
&lt;td&gt;Use &lt;code&gt;gpt-5.6-sol&lt;/code&gt; explicitly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model resolves but tool call fails&lt;/td&gt;
&lt;td&gt;Cause 5 (endpoint)&lt;/td&gt;
&lt;td&gt;Move the tool call to the Responses API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Every frontier model 404s, older ones work&lt;/td&gt;
&lt;td&gt;Cause 6 (verification/tier)&lt;/td&gt;
&lt;td&gt;Check verification and usage tier&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Alternatives That Get You Unblocked Now
&lt;/h2&gt;

&lt;p&gt;If you cannot wait for your own org's rollout or clear a tier gate, route the call through a gateway that already lists all three tiers. This is the fastest unblock, and it is a one-line model-string change from a standard OpenAI SDK setup.&lt;/p&gt;

&lt;p&gt;On ofox, all three GPT-5.6 tiers are live on the OpenAI-compatible endpoint, verified July 10, 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tier&lt;/th&gt;
&lt;th&gt;ofox model ID&lt;/th&gt;
&lt;th&gt;Price (per 1M, in / out)&lt;/th&gt;
&lt;th&gt;Detail page&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sol (flagship)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;openai/gpt-5.6-sol&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$5 / $30&lt;/td&gt;
&lt;td&gt;ofox.ai/models/openai/gpt-5.6-sol&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terra (balanced)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;openai/gpt-5.6-terra&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$2.50 / $15&lt;/td&gt;
&lt;td&gt;ofox.ai/models/openai/gpt-5.6-terra&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Luna (fast)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;openai/gpt-5.6-luna&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$1 / $6&lt;/td&gt;
&lt;td&gt;ofox.ai/models/openai/gpt-5.6-luna&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The switch from an OpenAI-direct client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="c1"&gt;# was: client = OpenAI()  # api.openai.com, waiting on your org rollout
&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.ofox.ai/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OFOX_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;openai/gpt-5.6-terra&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;# explicit tier, no bare-alias 404
&lt;/span&gt;    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Summarize this stack trace: ...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Node, same idea:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;OpenAI&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;openai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;baseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.ofox.ai/v1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OFOX_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;openai/gpt-5.6-terra&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Summarize this stack trace: ...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same SDK, same call shape, one changed base URL and model string. If cost is the reason you are moving anyway, Terra lists at exactly half of GPT-5.5's rate, and the GPT-5.6 Terra vs GPT-5.5 cost breakdown has the per-task math. For non-OpenAI options that undercut all three tiers, the GLM-5.2 vs GPT-5.5 cost comparison covers the open-weight side, and the $30 AI coding stack guide shows how to route across providers with automatic fallback so a single model's availability never blocks you again.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Monitor GPT-5.6 Availability and Get Alerted
&lt;/h2&gt;

&lt;p&gt;If you are waiting on a rollout or an access grant, do not sit there refreshing a curl command by hand. Poll the models endpoint on a timer and have it tell you the moment the tier appears. A minimal watcher:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-5.6-sol&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;ids&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;ids&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; is now available&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; not yet listed, rechecking in 5 min&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Point that at whichever surface you care about and let it run. When it prints the availability line, your grant has landed and you can flip production back to the direct key. Keep the poll interval at five minutes or more, since hammering the endpoint during a rollout adds nothing.&lt;/p&gt;

&lt;p&gt;For the platform side, watch OpenAI's official status page for API incidents that can also surface as availability errors, and keep a fallback route configured so a slow rollout never becomes an outage for your users. On a gateway, the model catalog is itself the availability signal: if the ofox model catalog lists the tier and your key is valid, the model is callable right now, no rollout to wait on. That is the practical difference between depending on one provider's rollout schedule and routing through a layer that already has the model live.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Confirm Access in Ten Seconds
&lt;/h2&gt;

&lt;p&gt;Before you retry anything, ask the API what it will actually serve your key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://api.openai.com/v1/models &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$OPENAI_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s1"&gt;'"id": *"gpt-5.6[^"]*"'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If that prints the tier IDs, the model exists for you and any error is in your request. If it prints nothing, your key does not have access yet, and the fix is access (rollout, org scope, verification), not code. On a gateway, the same idea applies: the ofox model catalog lists exactly what your key can call, so you never have to guess a model string.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prevent It From Recurring
&lt;/h2&gt;

&lt;p&gt;Fixing the error once is easy. Keeping it fixed is a matter of three habits that cost nothing to adopt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Name the tier everywhere, with no bare &lt;code&gt;gpt-5.6&lt;/code&gt; in your codebase.&lt;/strong&gt; Put the model ID in one config constant rather than scattering the string across call sites, so the next model bump is a one-line change and there is no stray bare alias hiding in a script you forgot about. A single source of truth for the model string is the difference between a thirty-second upgrade and an afternoon of grepping.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Validate the model at startup, not at first request.&lt;/strong&gt; Call the models-list endpoint when your service boots and fail loudly if the configured ID is absent, rather than discovering it when a user's request 404s in production. A four-line startup check turns a silent, intermittent user-facing failure into a clear deploy-time error you see immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep a fallback route wired in.&lt;/strong&gt; If your only path to GPT-5.6 is one provider on one org, any rollout lag, tier gate, or region hiccup becomes downtime. Routing through a layer that can fall back to another provider or another account means a single model's availability is never a single point of failure. The $30 AI coding stack guide walks through that routing pattern end to end, and it is the structural fix that makes all six causes above stop mattering to your users.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;The short version, in the order you should check: model string first, models list second, then org scope, region, endpoint, and verification. Five of the six causes are a one-line change on your side, and the sixth is a short wait or a switch to a gateway that already lists all three tiers.&lt;/p&gt;




&lt;p&gt;If GPT-5.6 is not available for your key, walk the six causes top to bottom: model string, rollout, org scope, region, endpoint, verification. Five of the six are yours to fix in under a minute, and the sixth is a short wait or a one-line switch to a gateway that already lists all three tiers.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/gpt-5-6-model-not-available-error-fix-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>openai</category>
      <category>troubleshooting</category>
      <category>errors</category>
    </item>
    <item>
      <title>Gemini CLI Free Tier Shut Down: 6 Fixes That Work (2026)</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Tue, 07 Jul 2026 09:48:44 +0000</pubDate>
      <link>https://dev.to/owen_fox/gemini-cli-free-tier-shut-down-6-fixes-that-work-2026-26hc</link>
      <guid>https://dev.to/owen_fox/gemini-cli-free-tier-shut-down-6-fixes-that-work-2026-26hc</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR.&lt;/strong&gt; On June 18, 2026, Gemini CLI stopped serving requests for the free "Sign in with Google" path, plus AI Pro and Ultra login. The binary is not dead: it is still Apache-2.0, still maintained (v0.49.0), and still runs on an API key. If you are staring at "This client is no longer supported for Gemini Code Assist for individuals," you have an auth problem, not a broken install. The fix is to stop logging in with a Google account and start using an API key with billing enabled. There is a second wall waiting in September 2026, when unrestricted Standard keys get retired, so set the key up correctly once instead of twice. Six fixes below, sorted from free-tier stopgap to production routing.&lt;/p&gt;

&lt;p&gt;Google did not kill Gemini CLI on June 18. It killed the free login. The tool still runs; it just wants a key now instead of your Google account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is Your Gemini CLI Broken? The 30-Second Diagnosis
&lt;/h2&gt;

&lt;p&gt;Three checks, in order. Most people who think the CLI is broken are one environment variable away from working.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;What to check&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;The error text&lt;/td&gt;
&lt;td&gt;"This client is no longer supported for Gemini Code Assist for individuals" means the free OAuth login is gone. "Quota exceeded … limit: 0" or &lt;code&gt;429 RESOURCE_EXHAUSTED&lt;/code&gt; means your key has no paid quota.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Which auth you use&lt;/td&gt;
&lt;td&gt;Run &lt;code&gt;gemini&lt;/code&gt; and watch the startup. If it opens a browser to sign in with Google, you are on the retired consumer login. If it reads an env var, you are on API-key auth.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;code&gt;echo $GEMINI_API_KEY&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Empty output plus a browser login prompt confirms you never moved off the free tier. That is the whole problem.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If step 1 shows the "no longer supported" message, skip ahead to Fix 1. If it shows a 429 or &lt;code&gt;limit: 0&lt;/code&gt;, you already have a key but no quota; go to Fix 3. Everything else in this guide is about doing the migration once so you do not hit the September key cutoff and have to redo it.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Fix in Place, and When to Switch Tools Instead
&lt;/h2&gt;

&lt;p&gt;This is the decision that saves you an afternoon of poking at the wrong layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix Gemini CLI in place (Fixes 1 to 5) if
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You have existing scripts, aliases, or CI that call &lt;code&gt;gemini&lt;/code&gt; and you do not want to rewrite them.&lt;/li&gt;
&lt;li&gt;You are fine paying per token and you want the same tool you already know.&lt;/li&gt;
&lt;li&gt;You need Vertex AI or a Code Assist license path, both of which the June 18 change left untouched.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Switch to Antigravity CLI if
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You were only ever on the free consumer login, you do not want to enable billing, and you want the path Google is actively steering consumers toward.&lt;/li&gt;
&lt;li&gt;You want the newer async background agent workflow and do not care that it is a separate, closed-source binary.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Route through a gateway (Fix 6) if
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You want one key across Gemini, GPT, Claude, and others without managing a Google Cloud project, billing tiers, and the September key migration.&lt;/li&gt;
&lt;li&gt;You are building something user-facing where a single provider's policy change should never take you down again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stop rule.&lt;/strong&gt; If you have re-run the Google login three times, cleared &lt;code&gt;~/.gemini&lt;/code&gt;, and reinstalled the CLI and still see "no longer supported," stop. Reinstalling cannot fix a server-side auth policy. The token exchange is being refused on purpose. Move to an API key and the loop ends.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Actually Changed on June 18, 2026
&lt;/h2&gt;

&lt;p&gt;Google announced this at I/O 2026 on May 19 and published it on the Developers Blog as "An important update: Transitioning Gemini CLI to Antigravity CLI." The operative sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"On June 18, 2026, Gemini CLI and Gemini Code Assist IDE extensions will stop serving requests for Google AI Pro and Ultra, as well as those using it free of charge using Gemini Code Assist for individuals."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Read that carefully, because the popular "Gemini CLI is dead" framing gets it wrong. Three separate auth paths, three different outcomes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Auth path&lt;/th&gt;
&lt;th&gt;Status after June 18, 2026&lt;/th&gt;
&lt;th&gt;What to do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OAuth "Sign in with Google" free tier (Code Assist for individuals, AI Pro, Ultra)&lt;/td&gt;
&lt;td&gt;Shut down. Requests no longer served.&lt;/td&gt;
&lt;td&gt;Move to an API key, or move to Antigravity CLI.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini API key from AI Studio&lt;/td&gt;
&lt;td&gt;Works. Free tier still exists for Flash models; paid tier fully supported.&lt;/td&gt;
&lt;td&gt;Set &lt;code&gt;GEMINI_API_KEY&lt;/code&gt;, enable billing for real quota.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Paid Gemini / Vertex "Gemini Enterprise Agent Platform" key, or Code Assist Standard/Enterprise license&lt;/td&gt;
&lt;td&gt;Explicitly unchanged.&lt;/td&gt;
&lt;td&gt;Keep going. Nothing to do.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Google's announcement is blunt about the survivors: "Gemini CLI will remain accessible via paid Gemini and Gemini Enterprise Agent Platform API keys," and enterprise license and Google Cloud access "remains unchanged." A follow-up repo notice, Discussion #28017, confirmed the individual-account cutoff went live as scheduled.&lt;/p&gt;

&lt;p&gt;The binary itself is fine. The repo is not archived, the license is still Apache-2.0, and v0.49.0 shipped on June 25, a week after the shutdown. Google said it plainly: the project "remains available to the community as an Apache 2.0 licensed repository with no changes." So when someone tells you to abandon your Gemini CLI setup, they are conflating "the free login ended" with "the tool ended." Only the first one is true.&lt;/p&gt;

&lt;p&gt;This did not come out of nowhere. Back on March 18, 2026, Google posted a service update (Discussion #22970), with restrictions effective March 25, that already limited free OAuth users to Flash-tier models and added "more robust detection for policy-violating use cases," while recommending people "use Gemini CLI with your own paid API key from AI Studio or Vertex AI." June 18 was the hard cutoff that the March update foreshadowed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Errors: What Each One Means
&lt;/h2&gt;

&lt;p&gt;Four error signatures cover almost every report. Match yours to the row and you know which fix applies.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Error you see&lt;/th&gt;
&lt;th&gt;Real cause&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;This client is no longer supported for Gemini Code Assist for individuals. To continue using Gemini, please migrate to the Antigravity suite of products.&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;You are on the retired free OAuth login. Browser step succeeds, token exchange is refused.&lt;/td&gt;
&lt;td&gt;Fix 1 (switch to API key)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;You must be a named user on your organization's Gemini Code Assist Standard edition subscription ...&lt;/code&gt; (403)&lt;/td&gt;
&lt;td&gt;Personal account hitting an org-only entitlement gate. An earlier variant of the same lockout (issue #14934).&lt;/td&gt;
&lt;td&gt;Fix 1 or Fix 5 (license/Vertex)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 0&lt;/code&gt; and &lt;code&gt;TerminalQuotaError: You have exhausted your daily quota on this model.&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Key is on Free Tier with zeroed quota; no paid provisioning behind it (issue #22486).&lt;/td&gt;
&lt;td&gt;Fix 3 (enable billing)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;429: rate limit exceeded&lt;/code&gt; with &lt;code&gt;limit: 0&lt;/code&gt; on a paid subscriber&lt;/td&gt;
&lt;td&gt;A Google One AI Pro subscription does not auto-provision paid API quota to your key (issue #24396).&lt;/td&gt;
&lt;td&gt;Fix 3 (enable billing, set a real cap)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The pattern worth internalizing: a login error points at the auth method, a &lt;code&gt;limit: 0&lt;/code&gt; error points at billing. They feel similar in the terminal and need completely different fixes. Do not enable billing to solve a login error, and do not re-login to solve a quota error.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Keep Gemini CLI Running (Fixes for Every Tier)
&lt;/h2&gt;

&lt;p&gt;Sorted from "free, works in five minutes" to "production routing." Apply the tier that matches you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Free / Individual Tier
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Fix 1: Switch from Google login to an AI Studio API key
&lt;/h3&gt;

&lt;p&gt;This is the core move and it resolves the "no longer supported" message directly. Create a key at &lt;a href="https://aistudio.google.com/apikey" rel="noopener noreferrer"&gt;aistudio.google.com/apikey&lt;/a&gt;, then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GEMINI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_ai_studio_key"&lt;/span&gt;
gemini &lt;span class="s2"&gt;"say hi"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A working response means you are back in business. If you want to confirm the CLI is actually on the key and not silently falling back to a cached login, check the auth line at startup or print the variable first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GEMINI_API_KEY&lt;/span&gt;:0:6&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;..."&lt;/span&gt;   &lt;span class="c"&gt;# should show the first chars of your key, not empty&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you would rather pick from a menu, run &lt;code&gt;/auth&lt;/code&gt; inside the CLI and choose the Gemini API key option instead of "Login with Google." The setting is saved in &lt;code&gt;~/.gemini/settings.json&lt;/code&gt; so you only do it once. One caveat on precedence: the client libraries accept both &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; and &lt;code&gt;GOOGLE_API_KEY&lt;/code&gt;, and if both are set, &lt;code&gt;GOOGLE_API_KEY&lt;/code&gt; wins. If your key looks correct but behaves oddly, check for a stray &lt;code&gt;GOOGLE_API_KEY&lt;/code&gt; in your shell profile left over from an old Vertex experiment.&lt;/p&gt;

&lt;p&gt;A free key still exists for the Flash and Flash-Lite families, so Fix 1 alone gets a lot of people running again. It is best-effort, though, which is the next fix.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 2: Reset a broken auth state before you blame the key
&lt;/h3&gt;

&lt;p&gt;If you switched keys but the CLI still tries to log in with Google, the old &lt;code&gt;selectedAuthType&lt;/code&gt; is cached. Clear it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Back up first, then reset the CLI's saved auth choice&lt;/span&gt;
&lt;span class="nb"&gt;mv&lt;/span&gt; ~/.gemini/settings.json ~/.gemini/settings.json.bak
gemini   &lt;span class="c"&gt;# will prompt /auth again; pick the API key option&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is also the fix for "Please set an Auth method" and for the case in issue #2111 where the CLI refuses to switch auth types while an API key is set. A stale settings file causes more "it still does not work" reports than any actual key problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Paid / Team Tier
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Fix 3: Enable billing to escape the 429 &lt;code&gt;limit: 0&lt;/code&gt; trap
&lt;/h3&gt;

&lt;p&gt;This is the fix for every "I added a key and still get 429" report. A raw AI Studio key sits on the Free Tier, and a Google One AI Pro subscription does not push paid quota into it. The metric comes back &lt;code&gt;limit: 0&lt;/code&gt;, which reads like a bug but is just an unprovisioned key.&lt;/p&gt;

&lt;p&gt;Do this once:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open AI Studio billing and link a Google Cloud Billing account to the project behind your key.&lt;/li&gt;
&lt;li&gt;Set a real spend cap. A $0 cap keeps you on Free Tier and reproduces the 429; set something you are comfortable with (even $10 is enough to move to paid Tier 1).&lt;/li&gt;
&lt;li&gt;Refresh the CLI auth: clear the cache from Fix 2 or re-export the key, then retry.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Google's tiers escalate with spend: Free, then Tier 1 (billing enabled), then Tier 2 and Tier 3 at higher paid thresholds, each raising your rate limits. Tier 1 alone carries a per-window spend allowance (on the order of $10 per 10 minutes) that is plenty for individual use.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 4: Right-size the model so the paid bill stays small
&lt;/h3&gt;

&lt;p&gt;You are paying per token now, so pick the model deliberately. Current standard pricing on the Gemini API, per 1M tokens (verified on the official pricing page, 2026-07-07):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Input / 1M&lt;/th&gt;
&lt;th&gt;Output / 1M&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 3.1 Flash-Lite&lt;/td&gt;
&lt;td&gt;$0.25&lt;/td&gt;
&lt;td&gt;$1.50&lt;/td&gt;
&lt;td&gt;Cheapest; fine for routine edits and shell tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 3.5 Flash&lt;/td&gt;
&lt;td&gt;$1.50&lt;/td&gt;
&lt;td&gt;$9.00&lt;/td&gt;
&lt;td&gt;Balanced default for coding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 3.1 Pro Preview&lt;/td&gt;
&lt;td&gt;$2.00 (prompts up to 200k)&lt;/td&gt;
&lt;td&gt;$12.00&lt;/td&gt;
&lt;td&gt;Reserve for hard reasoning; price steps up above 200k&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For most terminal work, Flash-Lite is the right default and keeps a heavy day under a dollar. Move up to Flash for real coding and only reach for Pro on the genuinely hard prompts. If you want the deeper pricing and performance breakdown, see the &lt;a href="https://ofox.ai/blog/gemini-3-1-pro-api-pricing-performance-guide-2026/" rel="noopener noreferrer"&gt;Gemini 3.1 Pro API pricing guide&lt;/a&gt;. Model names on Google's side move fast, so re-check the exact IDs at the &lt;a href="https://ai.google.dev/pricing" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt; before you hard-code them into scripts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enterprise / Production Tier
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Fix 5: Use Vertex AI or a Code Assist license
&lt;/h3&gt;

&lt;p&gt;Both of these paths were untouched by June 18, which makes them the cleanest option if you already have a Google Cloud footprint. For Vertex AI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GOOGLE_GENAI_USE_VERTEXAI&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true
export &lt;/span&gt;&lt;span class="nv"&gt;GOOGLE_CLOUD_PROJECT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-project-id"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GOOGLE_CLOUD_LOCATION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"us-central1"&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GOOGLE_APPLICATION_CREDENTIALS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/path/to/service-account.json"&lt;/span&gt;
gemini
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Vertex uses your Cloud project's billing and IAM, so quota and access are governed by the project, not by a personal account Google can reclassify. If your organization holds a Gemini Code Assist Standard or Enterprise license, the CLI and IDE extensions keep working with no change at all; that is stated directly in Google's announcement. For teams, this is usually the least fragile answer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 6: Route through one gateway and stop caring about Google's tiers
&lt;/h3&gt;

&lt;p&gt;If you would rather not manage a Cloud project, a billing tier, and the September key migration, point Gemini CLI at a gateway that speaks the Gemini protocol. Through &lt;a href="https://ofox.ai/docs/integrations/gemini-cli" rel="noopener noreferrer"&gt;ofox.ai&lt;/a&gt;, the same CLI uses one key, no Google Cloud account, and gets failover and routing on top:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"apiKey"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;your OFOX_API_KEY&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"baseUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://api.ofox.ai/gemini"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or as an environment variable, the same shape as before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GEMINI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;your OFOX_API_KEY&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That one key also reaches GPT, Claude, Qwen, DeepSeek, and the rest of the &lt;a href="https://ofox.ai/models" rel="noopener noreferrer"&gt;model marketplace&lt;/a&gt; through the same account, so the next time a single vendor changes its consumer policy, your CLI does not go down with it. This is the same routing idea covered in the &lt;a href="https://ofox.ai/blog/multi-model-router-one-api-2026/" rel="noopener noreferrer"&gt;multi-model router walkthrough&lt;/a&gt;, applied to Gemini CLI specifically.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Second Wall: API Key Deadlines You Have Not Hit Yet
&lt;/h2&gt;

&lt;p&gt;Fixing the login is not the end of the story, and this is the part most "just add a key" guides skip. Google is retiring old-style API keys on a separate schedule:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;What happens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;June 19, 2026&lt;/td&gt;
&lt;td&gt;The Gemini API begins rejecting unrestricted Standard keys. Standard keys with explicit API restrictions keep working.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;September 2026&lt;/td&gt;
&lt;td&gt;The Gemini API rejects all Standard keys. You must be on auth keys, which are bound to a Cloud service account.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The practical consequence: if you dig up an old unrestricted key from 2025 to fix your login today, you may hit a wall again in September. Create a new key now, since new keys are issued as auth keys by default, or apply explicit API restrictions to the key you use. Doing the migration once, correctly, is the difference between one bad afternoon and two.&lt;/p&gt;

&lt;h2&gt;
  
  
  Timeline: How the Gemini CLI Free Tier Wound Down
&lt;/h2&gt;

&lt;p&gt;The shutdown was gradual, and seeing the sequence explains why your setup broke when it did.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;Event&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;March 18, 2026&lt;/td&gt;
&lt;td&gt;Service update posted (restrictions effective March 25): limits free OAuth users to Flash-tier models, adds abuse detection, recommends paid API keys (Discussion #22970).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;May 19, 2026&lt;/td&gt;
&lt;td&gt;I/O 2026 announcement: Gemini CLI consumer/Pro/Ultra login transitioning to Antigravity CLI (Developers Blog + Discussion #27274).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;June 18, 2026&lt;/td&gt;
&lt;td&gt;Free, AI Pro, and Ultra logins stop serving requests. "No longer supported" errors begin.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;June 19, 2026&lt;/td&gt;
&lt;td&gt;Unrestricted Standard API keys start getting rejected (separate key-security change).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;June 25, 2026&lt;/td&gt;
&lt;td&gt;Gemini CLI v0.49.0 ships, confirming the binary is still maintained.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;September 2026&lt;/td&gt;
&lt;td&gt;Planned cutoff for all Standard keys; auth keys required.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If your CLI broke around mid-June, this is why. And if it is still working on an old key, the September row is the one to watch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Google Ended the Free Login
&lt;/h2&gt;

&lt;p&gt;You do not need the backstory to fix your terminal, but it explains why this is not a temporary outage you can wait out. Three forces line up.&lt;/p&gt;

&lt;p&gt;First, cost. A free OAuth login handed real model inference to anyone with a Google account, and coding agents are token-hungry: a single long session can burn through more tokens than a month of chat. The March 18 service update said the quiet part out loud when it added "more robust detection for policy-violating use cases (e.g. using Gemini CLI OAuth with third-party software)." People were wiring the free login into scripts and wrappers it was never meant to power, and the free tier was subsidizing that at Google's expense.&lt;/p&gt;

&lt;p&gt;Second, product consolidation. At I/O 2026 Google pulled its developer tooling under the Antigravity brand. Antigravity CLI, the desktop app, and the IDE story now share one architecture. The open-source Gemini CLI does not fit that funnel cleanly, so the consumer login got routed to the product Google actually wants to grow, while the CLI was left as the API-key and enterprise tool it started as.&lt;/p&gt;

&lt;p&gt;Third, abuse economics. Free credentials attached to a personal account are the easiest thing in the world to farm. Moving individuals onto keys with billing (or onto Antigravity's managed login) gives Google a caller identity for every request, which is the same reason the separate September Standard-key retirement exists.&lt;/p&gt;

&lt;p&gt;The takeaway for your setup: this is structural, not a blip. Plan for API-key auth as the permanent state, not a workaround until the free tier comes back. It is not coming back.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the Free Login Is Gone: Alternatives That Work Now
&lt;/h2&gt;

&lt;p&gt;If moving to a paid Google key is not what you want, here are the realistic options, ranked by how little ongoing management they need.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://ofox.ai/" rel="noopener noreferrer"&gt;ofox.ai&lt;/a&gt;.&lt;/strong&gt; One key that speaks the Gemini protocol (&lt;code&gt;https://api.ofox.ai/gemini&lt;/code&gt;) and also reaches GPT, Claude, Qwen, DeepSeek, and 100+ more through one OpenAI-compatible endpoint. No Google Cloud project, no billing-tier maze, no September key migration, and failover across providers if one vendor degrades. Best if you want the Gemini CLI workflow without being tied to one vendor's consumer policy. Setup is the same JSON file or env var you would use for Google's own key, so switching costs you a single line.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Antigravity CLI.&lt;/strong&gt; Google's official destination for consumer and Pro/Ultra logins. It is a closed-source Go binary with async background agents and a shared architecture with the Antigravity 2.0 desktop app. Best if you specifically want the free or Pro consumer path Google is now backing and you do not mind switching tools. Worth noting it is a different product, not a drop-in replacement: your existing &lt;code&gt;gemini&lt;/code&gt; scripts and aliases will not carry over unchanged.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Vertex AI (Gemini).&lt;/strong&gt; Same models, governed by your Cloud project's billing and IAM instead of a personal account Google can reclassify. Best if you already run on Google Cloud and want enterprise controls. Higher setup cost (project, service account, roles), but the most durable of the lot because nothing about it depends on the consumer login tier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;OpenRouter or similar gateways.&lt;/strong&gt; Another multi-provider option. Slower per request than a dedicated gateway and the markup stacks up, but worth knowing as a comparison point. See the &lt;a href="https://ofox.ai/blog/is-openrouter-reliable-honest-review-2026/" rel="noopener noreferrer"&gt;honest OpenRouter review&lt;/a&gt; for where the hidden cost lands.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the broader picture of running several assistants without a per-tool billing headache, the &lt;a href="https://ofox.ai/blog/cc-switch-install-multi-cli-setup-2026/" rel="noopener noreferrer"&gt;multi-CLI setup guide&lt;/a&gt; covers managing Gemini CLI alongside Codex and Claude Code, and the &lt;a href="https://ofox.ai/blog/how-to-reduce-ai-api-costs-2026/" rel="noopener noreferrer"&gt;cost-reduction playbook&lt;/a&gt; covers keeping the paid bill down once you are off the free tier.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Monitor Your Gemini CLI Auth and Quota
&lt;/h2&gt;

&lt;p&gt;Three things to watch so the next change does not surprise you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your live rate limits.&lt;/strong&gt; Google no longer prints exact free-tier requests-per-minute and per-day numbers in the docs; it moved them to the live &lt;a href="https://aistudio.google.com/rate-limit" rel="noopener noreferrer"&gt;AI Studio rate-limit dashboard&lt;/a&gt;. Check there, not a blog table, for what your key actually allows today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your spend cap.&lt;/strong&gt; If you enabled billing, watch the cap. A cap set too low silently drops you back into &lt;code&gt;limit: 0&lt;/code&gt; territory and looks exactly like the original bug.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your key type.&lt;/strong&gt; Before September, confirm your key is an auth key or a restricted Standard key. An unrestricted Standard key is a scheduled outage waiting for a date.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://ofox.ai/blog/gemini-cli-api-configuration-guide-2026/" rel="noopener noreferrer"&gt;full Gemini CLI configuration guide&lt;/a&gt; covers the settings-file and endpoint options in more depth if you want the complete setup reference rather than just the recovery path.&lt;/p&gt;

&lt;p&gt;A login error points at your auth method. A &lt;code&gt;limit: 0&lt;/code&gt; error points at your billing. They look the same in the terminal and need opposite fixes.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is Gemini CLI dead after June 18, 2026?&lt;/strong&gt; No. The open-source binary is still Apache-2.0, still shipping (v0.49.0 landed June 25), and still runs. What ended is the free consumer login: the "Sign in with Google" path for Code Assist for individuals, plus AI Pro and Ultra sign-in. Google's own words are that the CLI "will remain accessible via paid Gemini and Gemini Enterprise Agent Platform API keys." Set a key and the same tool keeps working.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does it say "This client is no longer supported for Gemini Code Assist for individuals"?&lt;/strong&gt; You are logging in with the retired free personal-account flow. The browser step reports success, but the token exchange is refused server-side, which is why reinstalling never helps. Switch auth from Google login to an API key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I switch from Google login to an API key?&lt;/strong&gt; Create a key at aistudio.google.com/apikey with billing enabled, then &lt;code&gt;export GEMINI_API_KEY=your_key&lt;/code&gt; and run &lt;code&gt;gemini&lt;/code&gt;. For a menu, run &lt;code&gt;/auth&lt;/code&gt; in the CLI and choose the API key option. If both &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; and &lt;code&gt;GOOGLE_API_KEY&lt;/code&gt; are set, &lt;code&gt;GOOGLE_API_KEY&lt;/code&gt; wins.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do I still get 429 "limit: 0" after adding a key?&lt;/strong&gt; Your key is on the Free Tier with no paid quota behind it, and a Google One AI Pro subscription does not auto-provision that quota. Enable billing in AI Studio, link a Cloud Billing account, and set a real spend cap (not $0). That moves the key to paid Tier 1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Will my key stop working in September 2026?&lt;/strong&gt; It can, if it is an unrestricted Standard key. Google began rejecting unrestricted Standard keys on June 19, 2026, and plans to reject all Standard keys in September in favor of auth keys bound to a Cloud service account. Create a new key now or apply explicit restrictions to your existing one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I keep any free tier for Gemini CLI?&lt;/strong&gt; There is still a free tier on the AI Studio key for the Flash and Flash-Lite families, separate from the killed login. Exact per-model rate limits are no longer published in the docs; they live in the AI Studio dashboard. Treat free-key quota as best-effort and enable billing if you need reliability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the difference between Gemini CLI and Antigravity CLI?&lt;/strong&gt; Gemini CLI is the existing open-source Node tool you install with npm and drive with an API key. Antigravity CLI is a new closed-source Go binary that Google made the destination for consumer and Pro/Ultra logins. Keep Gemini CLI if you want your existing scripts and setup; move to Antigravity if you only ever used the free login and want Google's managed consumer path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does enterprise access still work?&lt;/strong&gt; Yes. Organizations on a Gemini Code Assist Standard or Enterprise license, or using Google Cloud, keep access unchanged, and Vertex AI with &lt;code&gt;GOOGLE_GENAI_USE_VERTEXAI&lt;/code&gt; keeps working. June 18 targeted individual consumer login only.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources Checked for This Refresh
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Google Developers Blog, "An important update: Transitioning Gemini CLI to Antigravity CLI": &lt;a href="https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/" rel="noopener noreferrer"&gt;https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/&lt;/a&gt; (verified 2026-07-07). Confirms the June 18, 2026 cutoff for free, AI Pro, and Ultra login, and that paid Gemini, Vertex keys, and Code Assist licenses are unchanged.&lt;/li&gt;
&lt;li&gt;Gemini CLI repo Discussion #27274 (official transition notice) and #28017 (individual-account cutoff confirmation): &lt;a href="https://github.com/google-gemini/gemini-cli/discussions/27274" rel="noopener noreferrer"&gt;https://github.com/google-gemini/gemini-cli/discussions/27274&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gemini CLI repo Discussion #22970, posted March 18, 2026 with restrictions effective March 25 (free OAuth restricted to Flash, paid-key recommendation): &lt;a href="https://github.com/google-gemini/gemini-cli/discussions/22970" rel="noopener noreferrer"&gt;https://github.com/google-gemini/gemini-cli/discussions/22970&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub issue #28229, "OAuth login fails for Google AI Pro users" (v0.49.0, exact "no longer supported" string): &lt;a href="https://github.com/google-gemini/gemini-cli/issues/28229" rel="noopener noreferrer"&gt;https://github.com/google-gemini/gemini-cli/issues/28229&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub issues #22486 and #24396, the &lt;code&gt;limit: 0&lt;/code&gt; and 429 quota traps and the billing fix: &lt;a href="https://github.com/google-gemini/gemini-cli/issues/24396" rel="noopener noreferrer"&gt;https://github.com/google-gemini/gemini-cli/issues/24396&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google AI for Developers, "Using Gemini API keys": &lt;a href="https://ai.google.dev/gemini-api/docs/api-key" rel="noopener noreferrer"&gt;https://ai.google.dev/gemini-api/docs/api-key&lt;/a&gt; (verified 2026-07-07). Documents &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; and &lt;code&gt;GOOGLE_API_KEY&lt;/code&gt; precedence and the aistudio.google.com/apikey creation flow.&lt;/li&gt;
&lt;li&gt;Google Gemini API pricing: &lt;a href="https://ai.google.dev/pricing" rel="noopener noreferrer"&gt;https://ai.google.dev/pricing&lt;/a&gt; (verified 2026-07-07). Source for the per-1M token prices in the model table.&lt;/li&gt;
&lt;li&gt;Google Gemini API rate limits: &lt;a href="https://ai.google.dev/gemini-api/docs/rate-limits" rel="noopener noreferrer"&gt;https://ai.google.dev/gemini-api/docs/rate-limits&lt;/a&gt; (verified 2026-07-07). Tier structure, &lt;code&gt;429 RESOURCE_EXHAUSTED&lt;/code&gt;, and the note that limits now live in the AI Studio dashboard.&lt;/li&gt;
&lt;li&gt;ofox.ai Gemini CLI integration docs: &lt;a href="https://ofox.ai/docs/integrations/gemini-cli" rel="noopener noreferrer"&gt;https://ofox.ai/docs/integrations/gemini-cli&lt;/a&gt; (verified 2026-07-07). The &lt;code&gt;https://api.ofox.ai/gemini&lt;/code&gt; endpoint, &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; env var, and settings.json fields.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/gemini-cli-free-tier-shutdown-fix-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>gemini</category>
      <category>google</category>
      <category>troubleshooting</category>
    </item>
    <item>
      <title>Codex Desktop Not Showing Custom Models: 5 Fixes (2026)</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Sun, 05 Jul 2026 10:36:18 +0000</pubDate>
      <link>https://dev.to/owen_fox/codex-desktop-not-showing-custom-models-5-fixes-2026-10b2</link>
      <guid>https://dev.to/owen_fox/codex-desktop-not-showing-custom-models-5-fixes-2026-10b2</guid>
      <description>&lt;p&gt;You wired up a custom provider, &lt;code&gt;codex&lt;/code&gt; runs fine from the terminal, but the Desktop model picker acts like your models do not exist. That gap is almost never your API key or your config syntax. It is the Desktop client quietly filtering models that the backend already loaded.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 30-Second Diagnosis
&lt;/h2&gt;

&lt;p&gt;Before you rewrite anything, match your symptom to the table. Most people are one line away from a fix.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you see&lt;/th&gt;
&lt;th&gt;What is actually wrong&lt;/th&gt;
&lt;th&gt;First move&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Picker shows only "Custom", no model name&lt;/td&gt;
&lt;td&gt;Model set inline, no catalog metadata&lt;/td&gt;
&lt;td&gt;Fix 1: keep the inline &lt;code&gt;model&lt;/code&gt;, it works&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;codex&lt;/code&gt; CLI &lt;code&gt;/model&lt;/code&gt; lists it, Desktop does not&lt;/td&gt;
&lt;td&gt;Desktop client-side filter (issue #19694)&lt;/td&gt;
&lt;td&gt;Fix 1 now, Fix 4 for a real listing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Picker dropdown is empty&lt;/td&gt;
&lt;td&gt;Missing or malformed catalog&lt;/td&gt;
&lt;td&gt;Fix 2 or Fix 4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nothing loads, startup prints a warning&lt;/td&gt;
&lt;td&gt;Provider in project-local &lt;code&gt;.codex/config.toml&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Fix 3: move it to &lt;code&gt;~/.codex/&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cc-switch native provider, still hidden&lt;/td&gt;
&lt;td&gt;Pre-v3.16.5 catalog format&lt;/td&gt;
&lt;td&gt;Fix 4: update, then re-save&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The single fastest check: open a terminal in the same folder and run &lt;code&gt;codex&lt;/code&gt; (the CLI), then type &lt;code&gt;/model&lt;/code&gt;. If the CLI lists your model but Desktop does not, you have the client-side filter bug, and no amount of config editing on the Desktop side will surface it. Skip to Fix 1.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowchart TD
  A[Custom model missing in Desktop] --&amp;gt; B{Does CLI /model show it?}
  B -- Yes --&amp;gt; C[Desktop filter bug #19694]
  C --&amp;gt; F1[Fix 1: set model inline + Fix 4 catalog]
  B -- No --&amp;gt; D{Provider in ~/.codex/config.toml?}
  D -- No, it is project-local --&amp;gt; F3[Fix 3: move to user-level]
  D -- Yes --&amp;gt; E{Catalog file present + valid?}
  E -- No --&amp;gt; F2[Fix 2 or Fix 4: generate catalog]
  E -- Yes --&amp;gt; F1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When to Apply These Fixes (and When to Switch Models Instead)
&lt;/h2&gt;

&lt;p&gt;Fix the config when the model runs but the picker will not show it. That is a display problem, and it is worth ten minutes because everything else already works. Concretely, that is the case where your requests succeed from the CLI or a direct &lt;code&gt;curl&lt;/code&gt; and the model just does not appear in the Desktop dropdown. You are looking at the #19694 filter or a catalog gap, and Fixes 1 through 4 apply.&lt;/p&gt;

&lt;p&gt;Switch models instead of editing configs when the route itself is broken. If &lt;code&gt;curl https://your-gateway/v1/responses&lt;/code&gt; comes back 401, 404, or model-not-found, the picker is not your problem. The provider or the model string is wrong, and no amount of catalog editing will rescue a route that does not resolve.&lt;/p&gt;

&lt;p&gt;Then there is the exit condition. If your only goal is to send requests to a custom model, Fix 1 alone gets you there: set &lt;code&gt;model&lt;/code&gt; inline, restart, done. The rest of this guide is about making the picker show a clean, switchable list, which matters for teams and for anyone who swaps models often. If you never open the dropdown, stop after Fix 1.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Codex Desktop Hides Custom Models
&lt;/h2&gt;

&lt;p&gt;There are four distinct root causes, and they need different fixes. Getting the wrong one is why people spend an afternoon re-typing a working config.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Root cause&lt;/th&gt;
&lt;th&gt;Why the picker hides the model&lt;/th&gt;
&lt;th&gt;Which setups hit it&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Desktop client-side filter&lt;/td&gt;
&lt;td&gt;App-server returns the model via &lt;code&gt;model/list&lt;/code&gt;, the Desktop renderer drops it&lt;/td&gt;
&lt;td&gt;Any custom provider with a catalog&lt;/td&gt;
&lt;td&gt;Fix 1 + Fix 4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No catalog metadata&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;model&lt;/code&gt; set inline, picker has nothing to describe&lt;/td&gt;
&lt;td&gt;Minimal &lt;code&gt;config.toml&lt;/code&gt; setups&lt;/td&gt;
&lt;td&gt;Fix 1 (accept "Custom") or Fix 2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Malformed / stale catalog&lt;/td&gt;
&lt;td&gt;Catalog written in a format Codex will not enumerate&lt;/td&gt;
&lt;td&gt;Older cc-switch, hand-edited JSON&lt;/td&gt;
&lt;td&gt;Fix 2 / Fix 4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Project-local provider&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;model_provider&lt;/code&gt; ignored outside &lt;code&gt;~/.codex/config.toml&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.codex/config.toml&lt;/code&gt; in a repo&lt;/td&gt;
&lt;td&gt;Fix 3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first one is the one that surprises people. According to the open &lt;a href="https://github.com/openai/codex/issues/19694" rel="noopener noreferrer"&gt;codex issue #19694&lt;/a&gt;, the app-server loads the catalog correctly and returns your models through its &lt;code&gt;model/list&lt;/code&gt; endpoint, but the Desktop UI applies an extra filter and removes locally configured models before rendering the picker. The backend knows about your model. The frontend refuses to show it. That is a client bug, not a config error, and it was filed on 2026-04-26 and is still open at time of writing.&lt;/p&gt;

&lt;p&gt;The second cause is the most common and the least alarming. If you only wrote &lt;code&gt;model = "some-id"&lt;/code&gt; with no catalog, Codex has the string but no display name, no context window, no capability flags. The picker shows the label "Custom" and moves on. Your requests still go to the right model. This trips people up because "Custom" looks broken when it is actually working.&lt;/p&gt;

&lt;p&gt;The third cause is what cc-switch users hit before v3.16.5. The community traced it in &lt;a href="https://github.com/farion1231/cc-switch/issues/3668" rel="noopener noreferrer"&gt;cc-switch issue #3668&lt;/a&gt;: the generated catalog and the provider block did not line up with what Codex's picker enumerates, so &lt;code&gt;/model&lt;/code&gt; came back empty for third-party providers even though routing worked. More on the fix in Fix 4.&lt;/p&gt;

&lt;p&gt;The fourth cause has a tell. If you dropped your provider into a repo's &lt;code&gt;.codex/config.toml&lt;/code&gt;, Codex prints a startup warning and ignores the block entirely. Provider definitions are user-scoped only.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Codex Loads Models (and Where Desktop Diverges)
&lt;/h2&gt;

&lt;p&gt;Codex builds its model list in layers, and knowing the order tells you which fix will actually land. There are three sources: a catalog bundled with the binary, a remote catalog fetched from OpenAI, and your local &lt;code&gt;model_catalog_json&lt;/code&gt;. The local file wins. It overrides both the bundled and the remote catalog on startup, which is why a correct &lt;code&gt;model_catalog_json&lt;/code&gt; is the real lever for third-party models rather than a nice-to-have.&lt;/p&gt;

&lt;p&gt;Here is the part that trips everyone. When Codex starts, the app-server reads all three layers, resolves them, and exposes the result through an internal &lt;code&gt;model/list&lt;/code&gt; endpoint. The CLI renders that list directly, so custom models show up. The Desktop app renders the same list through an extra client step that, per issue #19694, applies its own allowlist and drops locally configured entries before they reach the dropdown. Same backend, same catalog, two different pickers. That single divergence is why the CLI is a dependable escape hatch and Desktop is not.&lt;/p&gt;

&lt;p&gt;There is also a cache to watch. Codex keeps &lt;code&gt;~/.codex/models_cache.json&lt;/code&gt;, and after you switch providers or edit a catalog it does not always resync. A stale cache can keep showing an old list, or an empty one, even after your config is correct. Deleting that file forces a clean rebuild on the next launch, which is worth trying before you assume the catalog itself is wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Fix It (Solutions for Every Setup)
&lt;/h2&gt;

&lt;p&gt;Work top to bottom. Fix 1 is the one that always works. The later fixes make the picker pretty and the list switchable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 1: Set the Model Inline (the reliable workaround)
&lt;/h3&gt;

&lt;p&gt;This is the workaround the #19694 thread converged on, and it is the one to reach for first. Put the model string directly in &lt;code&gt;config.toml&lt;/code&gt; and let the picker say "Custom".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.codex/config.toml   (user-level, not a project folder)&lt;/span&gt;
&lt;span class="py"&gt;model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"moonshotai/kimi-k2.7-code"&lt;/span&gt;
&lt;span class="py"&gt;model_provider&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"ofox"&lt;/span&gt;

&lt;span class="nn"&gt;[model_providers.ofox]&lt;/span&gt;
&lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"ofox"&lt;/span&gt;
&lt;span class="py"&gt;base_url&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"https://api.ofox.ai/v1"&lt;/span&gt;
&lt;span class="py"&gt;env_key&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"OFOX_API_KEY"&lt;/span&gt;
&lt;span class="py"&gt;wire_api&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"responses"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Export the key (&lt;code&gt;export OFOX_API_KEY=sk-...&lt;/code&gt; in your shell profile), fully quit Codex Desktop, and reopen it. The picker will read "Custom" but every request goes to &lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt;. If you are pointing at a different model, swap the string: &lt;code&gt;deepseek/deepseek-v4-pro&lt;/code&gt; or &lt;code&gt;openai/gpt-5.3-codex&lt;/code&gt; are the other coding IDs on the same gateway. All three are reachable from one key. For a walkthrough of the provider block itself, see the &lt;a href="https://ofox.ai/blog/codex-cli-custom-model-providers-byo-setup/" rel="noopener noreferrer"&gt;Codex CLI multi-provider setup via config.toml&lt;/a&gt; guide.&lt;/p&gt;

&lt;p&gt;A note on &lt;code&gt;wire_api&lt;/code&gt;. Codex removed its older &lt;code&gt;chat/completions&lt;/code&gt; path in early February 2026 (see &lt;a href="https://github.com/openai/codex/discussions/7782" rel="noopener noreferrer"&gt;discussion #7782&lt;/a&gt;); &lt;code&gt;responses&lt;/code&gt; is now the only supported value and the default when the key is omitted. A provider still set to &lt;code&gt;wire_api = "chat"&lt;/code&gt; fails on startup. The practical requirement is that your gateway must expose an OpenAI-compatible Responses endpoint at &lt;code&gt;{base_url}/responses&lt;/code&gt;, which ofox does at &lt;code&gt;https://api.ofox.ai/v1/responses&lt;/code&gt;, so &lt;code&gt;wire_api = "responses"&lt;/code&gt; is the right setting here. Point Codex at a gateway that only speaks &lt;code&gt;/chat/completions&lt;/code&gt; and every request 404s, which looks like a model problem but is a protocol mismatch. The full field list is in the &lt;a href="https://developers.openai.com/codex/config-reference" rel="noopener noreferrer"&gt;Codex configuration reference&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 2: Add a Model Catalog So the Picker Lists It
&lt;/h3&gt;

&lt;p&gt;If you want a real name in the dropdown instead of "Custom", you need a &lt;code&gt;model_catalog_json&lt;/code&gt;. This is a JSON file, loaded once at startup, with a top-level &lt;code&gt;models&lt;/code&gt; array. Each entry describes one model.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="c"&gt;# top of ~/.codex/config.toml&lt;/span&gt;
&lt;span class="py"&gt;model_catalog_json&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"/Users/you/.codex/ofox-models.json"&lt;/span&gt;
&lt;span class="py"&gt;model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"moonshotai/kimi-k2.7-code"&lt;/span&gt;
&lt;span class="py"&gt;model_provider&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"ofox"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A minimal catalog entry, using fields from the official &lt;a href="https://github.com/openai/codex/blob/main/codex-rs/models-manager/models.json" rel="noopener noreferrer"&gt;codex models.json&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"models"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"slug"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"moonshotai/kimi-k2.7-code"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"display_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Kimi K2.7 Code (ofox)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Coding model via the ofox gateway"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"context_window"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;262000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"max_context_window"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;262000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"supported_in_api"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"visibility"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"list"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"priority"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;slug&lt;/code&gt; must equal the string you send to the provider. The official catalog carries many more fields per model (reasoning levels, tool types, modality flags), and hand-authoring the full shape is fiddly, which is exactly why the next fix exists. Restart Desktop after any catalog change. This layer overrides both the bundled catalog and the remote one, and it only re-reads on startup, so a per-thread config change will not reapply it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 3: Move the Provider to the User-Level Config
&lt;/h3&gt;

&lt;p&gt;If Codex prints a startup warning about ignored provider settings, your provider block is in the wrong file. &lt;code&gt;model_provider&lt;/code&gt; and &lt;code&gt;model_providers&lt;/code&gt; only work in &lt;code&gt;~/.codex/config.toml&lt;/code&gt;. A repo's &lt;code&gt;.codex/config.toml&lt;/code&gt; cannot define providers. Project-local &lt;code&gt;model_catalog_json&lt;/code&gt; is a separate case — by design it should still be read, but on fresh Desktop threads it currently isn't, which is an open bug (#26308) rather than intended behavior.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# check where your provider actually lives&lt;/span&gt;
&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-rn&lt;/span&gt; &lt;span class="s2"&gt;"model_providers"&lt;/span&gt; ~/.codex/config.toml ./.codex/config.toml 2&amp;gt;/dev/null
&lt;span class="c"&gt;# if it is in ./.codex/config.toml, move the [model_providers.*] block&lt;/span&gt;
&lt;span class="c"&gt;# and model_provider = "..." into ~/.codex/config.toml, then restart&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep repo-specific things like instructions files in the project config. Keep the provider and the model catalog user-level.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 4: Let cc-switch v3.16.5 Generate the Catalog
&lt;/h3&gt;

&lt;p&gt;If you manage Codex through &lt;a href="https://github.com/farion1231/cc-switch/releases/tag/v3.16.5" rel="noopener noreferrer"&gt;cc-switch&lt;/a&gt;, update to v3.16.5 or later. That release is the one that fixes the empty picker for native providers. It generates &lt;code&gt;~/.codex/cc-switch-model-catalog.json&lt;/code&gt; for suppliers on native Responses endpoints (&lt;code&gt;apiFormat: "openai_responses"&lt;/code&gt;), which is what lets Codex Desktop actually see the models and use built-in tools.&lt;/p&gt;

&lt;p&gt;Two things you have to do after updating, or nothing changes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Re-save each native provider once.&lt;/strong&gt; The catalog is only regenerated on save. Existing providers keep their old (broken) state until you open and re-save them. There is no automatic migration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Understand the decoupling.&lt;/strong&gt; In v3.16.5 the model catalog no longer rides on the "local routing" toggle. Native Responses suppliers now generate the catalog whether or not local routing is on, while Chat-format suppliers keep going through proxy conversion as before.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# confirm the catalog exists and lists your models after re-saving&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.codex/cc-switch-model-catalog.json | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s1"&gt;'"slug":[^,]*'&lt;/span&gt;
&lt;span class="c"&gt;# if this is empty, re-save the provider in cc-switch and check again&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One caveat cc-switch itself disables: a few first-party Chinese models (MiMo, LongCat, MiniMax, Qwen3-Coder) do not support OpenAI's built-in &lt;code&gt;web_search&lt;/code&gt; on their gateways, so v3.16.5 turns that tool off for them by default to stop Codex throwing a hard 400. If you route those through a gateway, expect web search to be off.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Setup Errors That Mimic the Picker Bug
&lt;/h2&gt;

&lt;p&gt;Half the "custom models not showing" reports are really a broken route wearing a display costume. Before you touch the catalog, rule these out. Each one produces a symptom that looks like the picker hiding your model, when in fact the request never had a chance to land.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Real cause&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Startup error, or every request 404s&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;wire_api = "chat"&lt;/code&gt; (removed Feb 2026) or a gateway with no &lt;code&gt;/responses&lt;/code&gt; endpoint&lt;/td&gt;
&lt;td&gt;Set &lt;code&gt;wire_api = "responses"&lt;/code&gt; and point at a Responses-capable gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Every request returns 401&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;env_key&lt;/code&gt; named but the variable never exported&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;export OFOX_API_KEY=...&lt;/code&gt; in your shell profile&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model runs but returns the wrong output&lt;/td&gt;
&lt;td&gt;Catalog &lt;code&gt;slug&lt;/code&gt; does not match the provider's model ID&lt;/td&gt;
&lt;td&gt;Match &lt;code&gt;slug&lt;/code&gt; to the exact model string&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provider ignored, startup warning printed&lt;/td&gt;
&lt;td&gt;Block lives in project-local &lt;code&gt;.codex/config.toml&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Move it to &lt;code&gt;~/.codex/config.toml&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Intermittent connection resets&lt;/td&gt;
&lt;td&gt;Trailing slash or wrong path on &lt;code&gt;base_url&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;End the URL at &lt;code&gt;/v1&lt;/code&gt;, no trailing slash&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The tell that separates these from the real #19694 filter is one command: run the same request from the CLI. If the CLI also fails, it is one of the errors above, not the Desktop picker, and no catalog edit will fix it. If the CLI succeeds and only Desktop stays blind, then it is the filter, and you are back to Fix 1 and Fix 4.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known Codex Desktop Custom-Model Issues (2026 Timeline)
&lt;/h2&gt;

&lt;p&gt;This is not one bug. It is a cluster of related issues in the Codex app and in the tools that write its config. Knowing which one you have saves you from applying the wrong fix.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Issue&lt;/th&gt;
&lt;th&gt;What breaks&lt;/th&gt;
&lt;th&gt;Reported&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/openai/codex/issues/19694" rel="noopener noreferrer"&gt;openai/codex #19694&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Desktop picker filters out catalog models the backend loaded&lt;/td&gt;
&lt;td&gt;2026-04-26&lt;/td&gt;
&lt;td&gt;Open&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;openai/codex #26308&lt;/td&gt;
&lt;td&gt;Desktop ignores project-local &lt;code&gt;model_catalog_json&lt;/code&gt; on fresh threads&lt;/td&gt;
&lt;td&gt;2026&lt;/td&gt;
&lt;td&gt;Open&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;openai/codex #22160&lt;/td&gt;
&lt;td&gt;CLI &lt;code&gt;/model&lt;/code&gt; and Desktop pickers did not expose profile / provider aliases&lt;/td&gt;
&lt;td&gt;2026&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;openai/codex #15364&lt;/td&gt;
&lt;td&gt;No UI to pick a custom provider inside the Desktop app&lt;/td&gt;
&lt;td&gt;2026&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/farion1231/cc-switch/issues/3668" rel="noopener noreferrer"&gt;cc-switch #3668&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;cc-switch catalog format not recognized, &lt;code&gt;/model&lt;/code&gt; empty&lt;/td&gt;
&lt;td&gt;2026-06-03&lt;/td&gt;
&lt;td&gt;Fixed in v3.16.5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The pattern across all of these: the routing works, the display does not. The CLI has been the reliable escape hatch every time, because it reads the catalog without the Desktop renderer's extra filtering. If you are blocked in Desktop, the CLI (&lt;code&gt;codex&lt;/code&gt; in your terminal) will almost always show and use the model.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the Picker Still Won't Show Models: Alternatives That Work Now
&lt;/h2&gt;

&lt;p&gt;If you are done fighting the Desktop UI, here are ways to keep using custom models without waiting on a client fix. The point of a gateway here is one endpoint and one key across many models, so switching a model is a one-string edit rather than a new provider block each time.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;How the model reaches Codex&lt;/th&gt;
&lt;th&gt;Picker behavior&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ofox gateway&lt;/td&gt;
&lt;td&gt;One &lt;code&gt;base_url&lt;/code&gt;, one key, many model IDs&lt;/td&gt;
&lt;td&gt;"Custom" or catalog-listed&lt;/td&gt;
&lt;td&gt;Kimi, DeepSeek, GPT-Codex from one provider block&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex CLI&lt;/td&gt;
&lt;td&gt;Same config, terminal client&lt;/td&gt;
&lt;td&gt;Lists custom models reliably&lt;/td&gt;
&lt;td&gt;Bypasses the Desktop filter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Direct provider key&lt;/td&gt;
&lt;td&gt;Separate provider block per vendor&lt;/td&gt;
&lt;td&gt;Same filter applies&lt;/td&gt;
&lt;td&gt;More keys, more blocks to maintain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local (Ollama)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;base_url&lt;/code&gt; at localhost&lt;/td&gt;
&lt;td&gt;Warnings unless catalog set&lt;/td&gt;
&lt;td&gt;Offline, no gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Using &lt;a href="https://ofox.ai/models" rel="noopener noreferrer"&gt;ofox&lt;/a&gt; as the provider collapses the maintenance: &lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt; (262K context), &lt;code&gt;deepseek/deepseek-v4-pro&lt;/code&gt; (1M context), and &lt;code&gt;openai/gpt-5.3-codex&lt;/code&gt; (512K context) all sit behind the same &lt;code&gt;https://api.ofox.ai/v1&lt;/code&gt; and the same key, with current per-token pricing shown on each model's ofox page. To swap models you change one string in &lt;code&gt;config.toml&lt;/code&gt;, no new provider block, no second key. The base-URL setup for OpenAI-compatible clients is in the &lt;a href="https://ofox.ai/docs" rel="noopener noreferrer"&gt;ofox docs&lt;/a&gt;. Whichever path you take, the Desktop picker quirk is a display layer on top, not a routing constraint.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Verify Your Custom Models Are Actually Loaded
&lt;/h2&gt;

&lt;p&gt;Do not trust the picker as your source of truth, because that is the thing that is broken. Verify at the layer below it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nt"&gt;--version&lt;/span&gt;                 &lt;span class="c"&gt;# confirm you are on a recent build&lt;/span&gt;
codex                           &lt;span class="c"&gt;# start the CLI, then type /model&lt;/span&gt;
&lt;span class="c"&gt;# the CLI enumerates the catalog without the Desktop filter&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;/model&lt;/code&gt; in the CLI shows your model, the catalog and provider are correct and any remaining gap is the Desktop renderer. If the CLI also comes up empty, the problem is upstream: wrong file (Fix 3), malformed catalog (Fix 2 / Fix 4), or a bad &lt;code&gt;slug&lt;/code&gt;. For a raw sanity check that the route itself resolves, one &lt;code&gt;curl&lt;/code&gt; against the gateway with your key tells you whether the model exists before you blame the client at all. Routing first, display second.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why is Codex Desktop not showing my custom models?&lt;/strong&gt; Usually the model works and the Desktop app is filtering it out of the picker (issue #19694). Secondary causes: no catalog file, a malformed catalog from an older tool, or a provider defined in a project-local &lt;code&gt;.codex/config.toml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I add a custom model to Codex config.toml?&lt;/strong&gt; Define &lt;code&gt;[model_providers.NAME]&lt;/code&gt; with &lt;code&gt;base_url&lt;/code&gt;, &lt;code&gt;env_key&lt;/code&gt;, and &lt;code&gt;wire_api&lt;/code&gt;, then set &lt;code&gt;model_provider&lt;/code&gt; and &lt;code&gt;model&lt;/code&gt;. Keep it in &lt;code&gt;~/.codex/config.toml&lt;/code&gt;. For ofox, &lt;code&gt;base_url = "https://api.ofox.ai/v1"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does cc-switch work with Codex Desktop?&lt;/strong&gt; Yes, from v3.16.5, which generates &lt;code&gt;~/.codex/cc-switch-model-catalog.json&lt;/code&gt; for native Responses providers. Re-save each provider once after updating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where is the Codex model catalog file located?&lt;/strong&gt; Wherever &lt;code&gt;model_catalog_json&lt;/code&gt; points in &lt;code&gt;~/.codex/config.toml&lt;/code&gt;. cc-switch uses &lt;code&gt;~/.codex/cc-switch-model-catalog.json&lt;/code&gt;. Watch for a stale &lt;code&gt;~/.codex/models_cache.json&lt;/code&gt; after switching providers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does Codex show "Custom" instead of my model name?&lt;/strong&gt; You set &lt;code&gt;model&lt;/code&gt; inline with no catalog entry, so the picker has no display metadata. Requests still go to the right model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I use custom models in a project-local .codex/config.toml?&lt;/strong&gt; No. Provider settings only apply in &lt;code&gt;~/.codex/config.toml&lt;/code&gt;. Project-local provider blocks are ignored with a startup warning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is model_catalog_json in Codex?&lt;/strong&gt; A config.toml key pointing to a JSON file, loaded at startup, with a top-level &lt;code&gt;models&lt;/code&gt; array of entries carrying &lt;code&gt;slug&lt;/code&gt;, &lt;code&gt;display_name&lt;/code&gt;, and capability fields. It overrides the bundled and remote catalogs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I route Codex to Kimi, DeepSeek, or GPT-Codex?&lt;/strong&gt; Point one custom provider at a gateway and set &lt;code&gt;model&lt;/code&gt;. On ofox: &lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt;, &lt;code&gt;deepseek/deepseek-v4-pro&lt;/code&gt;, &lt;code&gt;openai/gpt-5.3-codex&lt;/code&gt;, all from &lt;code&gt;https://api.ofox.ai/v1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The fix for a model that runs but will not show up is almost always to stop editing the picker and start trusting the layer below it: the CLI already sees what the Desktop app is hiding.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/codex-desktop-not-showing-custom-models-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>codex</category>
      <category>troubleshooting</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Migrate Claude Code to Codex (2026): 12 Configs, 1 Dead End</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Fri, 03 Jul 2026 07:38:06 +0000</pubDate>
      <link>https://dev.to/owen_fox/migrate-claude-code-to-codex-2026-12-configs-1-dead-end-2pgl</link>
      <guid>https://dev.to/owen_fox/migrate-claude-code-to-codex-2026-12-configs-1-dead-end-2pgl</guid>
      <description>&lt;h1&gt;
  
  
  Migrate Claude Code to Codex (2026): 12 Configs, 1 Dead End
&lt;/h1&gt;

&lt;p&gt;Codex 0.142 /import auto-moves most of your Claude Code config. All 12 surfaces mapped: what transfers, what breaks, the 1 dead end, and the fix.&lt;/p&gt;

&lt;p&gt;Migrating from Claude Code to Codex is mostly a rename-and-reformat job, and Codex now ships a one-command importer that does most of it for you. The trouble hides in what it leaves behind, and one item in there is not a config file at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  30-Second Migration Verdict
&lt;/h2&gt;

&lt;p&gt;You can move nearly your whole Claude Code setup to Codex in about 20 minutes. Here is the decision before you scroll:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Can most of my config move?&lt;/td&gt;
&lt;td&gt;Yes. 9 of 12 surfaces transfer or reshape cleanly.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fastest path?&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;codex&lt;/code&gt; → &lt;code&gt;/import&lt;/code&gt; (Codex 0.140+), then hand-fix 3 items.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What auto-transfers?&lt;/td&gt;
&lt;td&gt;Memory files, MCP servers, skills, slash commands, custom endpoints.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What needs manual work?&lt;/td&gt;
&lt;td&gt;Permissions model, hooks format, subagent wrappers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The one dead end?&lt;/td&gt;
&lt;td&gt;Anthropic Claude models. Vanilla Codex is OpenAI-only.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The fix for the dead end?&lt;/td&gt;
&lt;td&gt;Add a gateway as a &lt;code&gt;model_provider&lt;/code&gt; and keep running Claude inside Codex.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Versions this guide was tested against: Codex CLI &lt;strong&gt;0.142.5&lt;/strong&gt; (July 1, 2026) and Claude Code &lt;strong&gt;2.1.178&lt;/strong&gt;. If you are on an older Codex, upgrade first, because the &lt;code&gt;/import&lt;/code&gt; command did not exist before 0.140.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Can Move Today (And What You Can't)
&lt;/h2&gt;

&lt;p&gt;Almost everything moves, because the two tools solve the same problem with different file formats. Claude Code leans on JSON (&lt;code&gt;settings.json&lt;/code&gt;, &lt;code&gt;.mcp.json&lt;/code&gt;) and Markdown (&lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;.claude/agents/*.md&lt;/code&gt;). Codex leans on a single TOML file (&lt;code&gt;~/.codex/config.toml&lt;/code&gt;) plus &lt;code&gt;AGENTS.md&lt;/code&gt;. The migration is largely a translation between those two dialects.&lt;/p&gt;

&lt;p&gt;What you &lt;strong&gt;can&lt;/strong&gt; move:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Repo and personal instructions (&lt;code&gt;CLAUDE.md&lt;/code&gt; content)&lt;/li&gt;
&lt;li&gt;  MCP servers, verbatim command and args&lt;/li&gt;
&lt;li&gt;  Skills, which already follow the shared Agent Skills convention&lt;/li&gt;
&lt;li&gt;  Slash commands and reusable prompts&lt;/li&gt;
&lt;li&gt;  Custom API endpoints and keys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What you &lt;strong&gt;cannot&lt;/strong&gt; move without a workaround:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Claude Code's per-command permission allowlist, which has no direct Codex analog&lt;/li&gt;
&lt;li&gt;  The &lt;code&gt;ConfigChange&lt;/code&gt; hook event (Codex has &lt;code&gt;PreCompact&lt;/code&gt;/&lt;code&gt;PostCompact&lt;/code&gt;, but nothing that fires on a config-file change)&lt;/li&gt;
&lt;li&gt;  Output styles, which Codex does not model&lt;/li&gt;
&lt;li&gt;  The Anthropic models themselves, which is the real blocker and the reason for the last section&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is the full surface map. Save this table; it is the whole migration in one screen.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Claude Code&lt;/th&gt;
&lt;th&gt;Codex equivalent&lt;/th&gt;
&lt;th&gt;Verdict&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;CLAUDE.md&lt;/code&gt; memory&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; (or fallback filename)&lt;/td&gt;
&lt;td&gt;Transfers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.mcp.json&lt;/code&gt; (JSON)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;[mcp_servers.*]&lt;/code&gt; in &lt;code&gt;config.toml&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Transfers, reformat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/skills/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Codex skills (&lt;code&gt;[[skills.config]]&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Transfers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/commands/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Codex slash commands / prompts&lt;/td&gt;
&lt;td&gt;Transfers, re-author&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.claude/agents/&lt;/code&gt; (Markdown)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.codex/agents/*.toml&lt;/code&gt; files&lt;/td&gt;
&lt;td&gt;Reshapes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;settings.json&lt;/code&gt; (JSON)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;config.toml&lt;/code&gt; + profiles (TOML)&lt;/td&gt;
&lt;td&gt;Reshapes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;&lt;code&gt;permissions.allow/ask/deny&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;approval_policy&lt;/code&gt; + &lt;code&gt;sandbox_mode&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Breaks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;hooks&lt;/code&gt; (PreToolUse, Stop, …)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;[[hooks.*]]&lt;/code&gt; in &lt;code&gt;config.toml&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Reshapes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ConfigChange&lt;/code&gt; hook&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;No equivalent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; endpoint&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[model_providers.*]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Transfers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;&lt;code&gt;outputStyle&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;No equivalent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;Anthropic Claude models&lt;/td&gt;
&lt;td&gt;OpenAI models only&lt;/td&gt;
&lt;td&gt;Dead end (see fix)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Rows 9 and 11 are cosmetic. You will not miss &lt;code&gt;outputStyle&lt;/code&gt;, and &lt;code&gt;ConfigChange&lt;/code&gt; only matters if you built automation that reacts to a config file changing mid-session. Row 12 is the one that stops people, and it has a clean fix that most migration guides skip.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decision Frame: When to Migrate (and When to Stay)
&lt;/h2&gt;

&lt;p&gt;Migrate when your work is task-shaped and you want tighter sandboxing; stay on Claude Code when your work is conversation-shaped and hook-driven. The two tools carry different mental models, and the config differences follow from that.&lt;/p&gt;

&lt;h3&gt;
  
  
  When to Migrate
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  You run agents non-interactively in CI and want a &lt;code&gt;read-only&lt;/code&gt; or &lt;code&gt;workspace-write&lt;/code&gt; sandbox as the default posture.&lt;/li&gt;
&lt;li&gt;  Your team wants one committed &lt;code&gt;config.toml&lt;/code&gt; with profiles per risk level, instead of a &lt;code&gt;settings.json&lt;/code&gt; plus a pile of &lt;code&gt;settings.local.json&lt;/code&gt; overrides.&lt;/li&gt;
&lt;li&gt;  You want OpenAI's current Codex models (&lt;code&gt;gpt-5.5&lt;/code&gt;) as the default driver. The older &lt;code&gt;gpt-5.3-codex&lt;/code&gt; was deprecated as a user-selectable Codex model on 2026-05-26, so pick &lt;code&gt;gpt-5.5&lt;/code&gt; or &lt;code&gt;gpt-5.4&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When NOT to Migrate
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  You depend on &lt;code&gt;ConfigChange&lt;/code&gt; hooks or output styles. Those have no home in Codex, so budget rework or stay put.&lt;/li&gt;
&lt;li&gt;  Your whole workflow is a long interactive pairing session. Claude Code's conversational model fits that better than Codex's task-and-review loop.&lt;/li&gt;
&lt;li&gt;  You have a large hand-tuned permission allowlist. Codex's coarse sandbox tiers will feel blunt, and porting the intent takes real thought (see Step 5).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Stop Rule
&lt;/h3&gt;

&lt;p&gt;If your only goal is to try Codex's models against your existing repo, you do not need to migrate config at all. Point Codex at your repo, run &lt;code&gt;/import&lt;/code&gt;, and stop. The rest of this guide is for people making Codex their primary tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  System Requirements
&lt;/h2&gt;

&lt;p&gt;Before you touch config, confirm the four prerequisites below. A stale Codex is the most common reason &lt;code&gt;/import&lt;/code&gt; and the &lt;code&gt;[features]&lt;/code&gt; blocks silently do nothing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Codex CLI 0.140.0 or newer.&lt;/strong&gt; Check with &lt;code&gt;codex --version&lt;/code&gt;. The &lt;code&gt;/import&lt;/code&gt; command landed in 0.140.0; this guide was tested on 0.142.5.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Your existing Claude Code project&lt;/strong&gt;, with its &lt;code&gt;.claude/&lt;/code&gt; directory and &lt;code&gt;CLAUDE.md&lt;/code&gt; intact. Do not delete it until the migration is verified.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;An API key&lt;/strong&gt; for whichever provider will drive Codex. OpenAI by default, or a gateway key if you are keeping Claude models.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Write access to &lt;code&gt;~/.codex/&lt;/code&gt;.&lt;/strong&gt; Codex reads &lt;code&gt;~/.codex/config.toml&lt;/code&gt; on every invocation and, in trusted projects, &lt;code&gt;.codex/config.toml&lt;/code&gt; at the repo root.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The migration path looks like this end to end:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowchart LR
    A[Audit CLAUDE.md + settings.json] --&amp;gt; B[Run codex /import]
    B --&amp;gt; C[Review conflict report]
    C --&amp;gt; D[Hand-fix permissions + hooks]
    D --&amp;gt; E[Add model_provider for Claude models]
    E --&amp;gt; F[Test with a read-only profile]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step-by-Step: Mapping Every Config Surface
&lt;/h2&gt;

&lt;p&gt;Run the automated importer first, then walk the five surfaces it cannot fully handle. Do not skip the manual passes; the importer is honest about what it leaves behind, but it does leave things behind.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Run the Importer
&lt;/h3&gt;

&lt;p&gt;Start Codex in your project and import.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;my-project
codex
&lt;span class="c"&gt;# then, inside the session:&lt;/span&gt;
/import
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Codex 0.140 added &lt;code&gt;/import&lt;/code&gt; for selectively pulling setup, project configuration, and recent chats from Claude Code, per the &lt;a href="https://developers.openai.com/codex/changelog" rel="noopener noreferrer"&gt;OpenAI Codex changelog&lt;/a&gt;. Pick the surfaces you want. Expected result: a populated &lt;code&gt;~/.codex/config.toml&lt;/code&gt;, an &lt;code&gt;AGENTS.md&lt;/code&gt; draft, and a short report listing anything it skipped or flagged as a conflict.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Instructions, CLAUDE.md to AGENTS.md
&lt;/h3&gt;

&lt;p&gt;Codex reads &lt;code&gt;AGENTS.md&lt;/code&gt;, not &lt;code&gt;CLAUDE.md&lt;/code&gt;. If the importer did not already create one, either rename your file or tell Codex to keep reading the old name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.codex/config.toml&lt;/span&gt;
&lt;span class="py"&gt;project_doc_fallback_filenames&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"AGENTS.md"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"CLAUDE.md"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="py"&gt;project_doc_max_bytes&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;32768&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result: your repo-level instructions load into Codex context on the next run. The content carries over unchanged; only the filename and load path differ, which is why the &lt;code&gt;AGENTS.md&lt;/code&gt; convention exists across tools in the first place.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: MCP Servers, JSON to TOML
&lt;/h3&gt;

&lt;p&gt;The MCP processes are identical. Only the declaration changes shape. A Claude Code &lt;code&gt;.mcp.json&lt;/code&gt; entry like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"github"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@modelcontextprotocol/server-github"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;becomes a TOML table in &lt;code&gt;~/.codex/config.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[mcp_servers.github]&lt;/span&gt;
&lt;span class="py"&gt;command&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"npx"&lt;/span&gt;
&lt;span class="py"&gt;args&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"@modelcontextprotocol/server-github"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result: &lt;code&gt;codex&lt;/code&gt; lists the &lt;code&gt;github&lt;/code&gt; MCP tools on startup. If a server needs environment variables, add them inline: &lt;code&gt;env = { "GITHUB_TOKEN" = "..." }&lt;/code&gt;. Both transports carry over: Codex accepts the same STDIO command-based servers you ran in Claude Code, and it also takes streaming HTTP servers in the same table, so a remotely hosted MCP endpoint moves without spawning a local process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Subagents to .codex/agents/
&lt;/h3&gt;

&lt;p&gt;Claude Code stores subagents as Markdown in &lt;code&gt;.claude/agents/&lt;/code&gt;. Codex stores each subagent as its own TOML file, one file per agent, under &lt;code&gt;~/.codex/agents/&lt;/code&gt; (personal) or &lt;code&gt;.codex/agents/&lt;/code&gt; (project-scoped). Subagents are enabled by default, so there is no feature flag to flip.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="c"&gt;# .codex/agents/reviewer.toml&lt;/span&gt;
&lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"reviewer"&lt;/span&gt;
&lt;span class="py"&gt;description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Reviews diffs for correctness and style"&lt;/span&gt;
&lt;span class="py"&gt;developer_instructions&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"""
Review the diff for correctness and style. Cite file and line for each issue.
"""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result: the reviewer role becomes available through Codex's subagent workflow, which Codex invokes only when you explicitly ask for it. The prompt body from your old Markdown file moves into &lt;code&gt;developer_instructions&lt;/code&gt;; the wrapper is what changes. If you had many subagents, this is the most tedious manual pass, but it is mechanical.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Permissions to Sandbox and Approval
&lt;/h3&gt;

&lt;p&gt;This is the surface that genuinely breaks, because the two tools model safety differently. Claude Code uses a per-command allowlist with glob rules. Codex uses two coarse dials: a filesystem sandbox and an approval policy. There is no clean one-to-one mapping, so you port intent, not rules.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Claude Code&lt;/th&gt;
&lt;th&gt;Codex intent&lt;/th&gt;
&lt;th&gt;Codex setting&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;allow: ["Bash(npm run test *)"]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;run commands in the repo without asking&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;sandbox_mode = "workspace-write"&lt;/code&gt;, &lt;code&gt;approval_policy = "on-request"&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ask: ["Bash(python *)"]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;prompt before risky commands&lt;/td&gt;
&lt;td&gt;&lt;code&gt;approval_policy = "on-request"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;deny: ["Read(./.env)"]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;block access outside the workspace&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;sandbox_mode = "workspace-write"&lt;/code&gt; (blocks writes outside cwd)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plan mode&lt;/td&gt;
&lt;td&gt;look, do not touch&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sandbox_mode = "read-only"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--dangerously-skip-permissions&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;full autonomy&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;approval_policy = "never"&lt;/code&gt;, &lt;code&gt;sandbox_mode = "danger-full-access"&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.codex/config.toml, a sane default&lt;/span&gt;
&lt;span class="py"&gt;approval_policy&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"on-request"&lt;/span&gt;
&lt;span class="py"&gt;sandbox_mode&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"workspace-write"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result: Codex runs freely inside the repo and asks before touching anything outside it or reaching the network. The granular per-command control you had in Claude Code does not survive; if you relied on a long, precise allowlist, accept that Codex's model is blunter by design. The full option set is in the &lt;a href="https://developers.openai.com/codex/config-reference" rel="noopener noreferrer"&gt;Codex configuration reference&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Hooks
&lt;/h3&gt;

&lt;p&gt;Codex has hooks now, enabled by default, and they cover most of Claude Code's events. You declare them as array-of-tables blocks in &lt;code&gt;config.toml&lt;/code&gt;; to turn the whole system off you would set &lt;code&gt;[features] hooks = false&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.codex/config.toml&lt;/span&gt;
&lt;span class="nn"&gt;[[hooks.PreToolUse]]&lt;/span&gt;
&lt;span class="py"&gt;matcher&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"^Bash$"&lt;/span&gt;          &lt;span class="c"&gt;# same idea as Claude Code's PreToolUse matcher&lt;/span&gt;

  &lt;span class="nn"&gt;[[hooks.PreToolUse.hooks]]&lt;/span&gt;
  &lt;span class="py"&gt;type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"command"&lt;/span&gt;
  &lt;span class="py"&gt;command&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"$(git rev-parse --show-toplevel)/.codex/hooks/pre_tool_use.sh"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result: &lt;code&gt;PreToolUse&lt;/code&gt;, &lt;code&gt;PostToolUse&lt;/code&gt;, &lt;code&gt;SessionStart&lt;/code&gt;, &lt;code&gt;Stop&lt;/code&gt;, and even &lt;code&gt;PreCompact&lt;/code&gt;/&lt;code&gt;PostCompact&lt;/code&gt; fire as they did in Claude Code, once you translate the JSON handler into TOML. The one gap is &lt;code&gt;ConfigChange&lt;/code&gt;, which has no Codex event, so any automation you built to react to a config file changing mid-session is the one part of your hook setup that does not come along. For a refresher on what those Claude Code hooks did, see our &lt;a href="https://ofox.ai/blog/claude-code-hooks-subagents-skills-complete-guide-2026/" rel="noopener noreferrer"&gt;Claude Code hooks, subagents, and skills guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Has No Equivalent: Claude Models (and the Fix)
&lt;/h2&gt;

&lt;p&gt;The single migration step with no native answer is keeping your Claude models, because vanilla Codex authenticates against OpenAI and drives OpenAI models such as &lt;code&gt;gpt-5.5&lt;/code&gt; and &lt;code&gt;gpt-5.4&lt;/code&gt;. There is no built-in switch that selects Claude Opus or Sonnet. If you migrated to Codex for its sandbox and workflow but still want Opus writing your code, you need a bridge.&lt;/p&gt;

&lt;p&gt;The bridge is a custom &lt;code&gt;model_provider&lt;/code&gt;. Codex will talk to any OpenAI-compatible gateway, so you register one and point a profile at a Claude model. Add the provider to &lt;code&gt;~/.codex/config.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[model_providers.ofox]&lt;/span&gt;
&lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"ofox.ai gateway"&lt;/span&gt;
&lt;span class="py"&gt;base_url&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"https://api.ofox.ai/v1"&lt;/span&gt;
&lt;span class="py"&gt;env_key&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"OFOX_API_KEY"&lt;/span&gt;
&lt;span class="py"&gt;wire_api&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"responses"&lt;/span&gt;
&lt;span class="py"&gt;requires_openai_auth&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two details that trip people up. First, set &lt;code&gt;wire_api = "responses"&lt;/code&gt;. Codex removed support for the older &lt;code&gt;chat&lt;/code&gt; protocol in February 2026, so a provider left on &lt;code&gt;wire_api = "chat"&lt;/code&gt; now errors on startup; ofox serves a Responses-compatible endpoint under the same &lt;code&gt;/v1&lt;/code&gt; base URL, so &lt;code&gt;responses&lt;/code&gt; is what actually connects. Second, set &lt;code&gt;requires_openai_auth = false&lt;/code&gt; so Codex stops expecting an &lt;code&gt;sk-&lt;/code&gt; key prefix. Then create a profile file at &lt;code&gt;~/.codex/claude.config.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="py"&gt;model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"anthropic/claude-opus-4.8"&lt;/span&gt;
&lt;span class="py"&gt;model_provider&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"ofox"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it with &lt;code&gt;codex --profile claude&lt;/code&gt;. Now Codex's task loop and sandbox drive Anthropic's &lt;code&gt;anthropic/claude-opus-4.8&lt;/code&gt;, and swapping &lt;code&gt;model = "openai/gpt-5.5"&lt;/code&gt; in a second profile lets you A/B the two without changing auth. The step-by-step for the provider block, including retries and headers, is in our walkthrough on &lt;a href="https://ofox.ai/blog/codex-cli-custom-model-providers-byo-setup/" rel="noopener noreferrer"&gt;custom model providers in Codex&lt;/a&gt;, and the full &lt;a href="https://ofox.ai/docs" rel="noopener noreferrer"&gt;ofox docs&lt;/a&gt; cover the key setup. This is the one migration surface where a gateway is not a convenience but the only way to keep what you came for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Errors During Migration (and Fixes)
&lt;/h2&gt;

&lt;p&gt;Six failures cover almost every stuck migration. The pattern is the same each time: a Claude Code assumption that Codex does not share.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Cause&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Codex ignores your &lt;code&gt;CLAUDE.md&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Codex reads &lt;code&gt;AGENTS.md&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Rename it, or set &lt;code&gt;project_doc_fallback_filenames&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom provider returns &lt;code&gt;401&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Codex expects an &lt;code&gt;sk-&lt;/code&gt; key&lt;/td&gt;
&lt;td&gt;Add &lt;code&gt;requires_openai_auth = false&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex errors on startup: &lt;code&gt;chat&lt;/code&gt; wire API deprecated&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;wire_api = "chat"&lt;/code&gt; was removed in Feb 2026&lt;/td&gt;
&lt;td&gt;Set &lt;code&gt;wire_api = "responses"&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subagents do nothing&lt;/td&gt;
&lt;td&gt;No agent file, or you never asked for one&lt;/td&gt;
&lt;td&gt;Add a &lt;code&gt;.codex/agents/NAME.toml&lt;/code&gt; file; Codex spawns subagents only on explicit request&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hooks never fire&lt;/td&gt;
&lt;td&gt;Wrong event name or &lt;code&gt;matcher&lt;/code&gt; regex&lt;/td&gt;
&lt;td&gt;Fix the event name / &lt;code&gt;matcher&lt;/code&gt;; hooks are on by default, so no flag is needed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A command your allowlist permitted now stops&lt;/td&gt;
&lt;td&gt;Sandbox stricter than the old rule&lt;/td&gt;
&lt;td&gt;Widen &lt;code&gt;sandbox_mode&lt;/code&gt; or use &lt;code&gt;approval_policy = "on-request"&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If a project's &lt;code&gt;.codex/config.toml&lt;/code&gt; is being ignored entirely, check that the project is marked trusted. Codex only loads project-scoped config in trusted directories, and it will not let a project file override provider, auth, or profile selection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Team / Multi-Developer Migration
&lt;/h2&gt;

&lt;p&gt;For a team, the migration is cleaner than the solo case, because Codex collapses two Claude Code files into one committed config. In Claude Code you shipped a &lt;code&gt;.claude/settings.json&lt;/code&gt; for the team and let each developer keep a gitignored &lt;code&gt;.claude/settings.local.json&lt;/code&gt;. In Codex, you commit a single &lt;code&gt;.codex/config.toml&lt;/code&gt; at the repo root and let each developer select a profile.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concern&lt;/th&gt;
&lt;th&gt;Claude Code&lt;/th&gt;
&lt;th&gt;Codex&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Shared team config&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.claude/settings.json&lt;/code&gt; (committed)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.codex/config.toml&lt;/code&gt; (committed, trusted repos)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Personal overrides&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.claude/settings.local.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;a personal profile file in &lt;code&gt;~/.codex/&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shared instructions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Risk posture per run&lt;/td&gt;
&lt;td&gt;permission allowlist&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;--profile strict&lt;/code&gt; vs &lt;code&gt;--profile fast&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The team payoff is the same gateway trick from the last section, applied once. Register one &lt;code&gt;model_provider&lt;/code&gt; in the committed config, hand every developer the same &lt;code&gt;OFOX_API_KEY&lt;/code&gt; scheme through your secret manager, and the whole team routes through one endpoint with one billing view, whether they run &lt;code&gt;openai/gpt-5.5&lt;/code&gt; or &lt;code&gt;anthropic/claude-opus-4.8&lt;/code&gt;. That single-endpoint routing is the concrete reason a shared gateway beats per-developer OpenAI keys; the config detail lives in our &lt;a href="https://ofox.ai/blog/codex-cli-config-toml-deep-dive/" rel="noopener noreferrer"&gt;config.toml deep dive&lt;/a&gt;, and installation basics are in the &lt;a href="https://ofox.ai/blog/codex-official-installation-complete/" rel="noopener noreferrer"&gt;Codex install guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Migrating your tooling to Codex should not mean giving up the models you migrated for, and with one provider block it doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced: Profiles for CI, Local, and Review
&lt;/h2&gt;

&lt;p&gt;Profiles are where Codex pays back the migration effort, because they replace the Claude Code habit of juggling &lt;code&gt;settings.json&lt;/code&gt; against &lt;code&gt;settings.local.json&lt;/code&gt;. A profile is a separate file under &lt;code&gt;~/.codex/&lt;/code&gt;, and you select it per run with &lt;code&gt;--profile&lt;/code&gt;. Nothing changes globally until you decide it should.&lt;/p&gt;

&lt;p&gt;Create three files for three risk postures:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="c"&gt;# ~/.codex/ci.config.toml&lt;/span&gt;
&lt;span class="py"&gt;model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"gpt-5.5"&lt;/span&gt;
&lt;span class="py"&gt;approval_policy&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"never"&lt;/span&gt;
&lt;span class="py"&gt;sandbox_mode&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"read-only"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run automated review in CI with &lt;code&gt;codex --profile ci&lt;/code&gt;, and it can read everything but change nothing. Keep a &lt;code&gt;local.config.toml&lt;/code&gt; at &lt;code&gt;workspace-write&lt;/code&gt; for day-to-day work, and the &lt;code&gt;claude.config.toml&lt;/code&gt; from the last section that swaps the driver to &lt;code&gt;anthropic/claude-opus-4.8&lt;/code&gt; when you want Anthropic's model on a hard problem. The base &lt;code&gt;config.toml&lt;/code&gt; holds the shared pieces, providers, MCP servers, and hooks; each profile overrides only the two or three keys that differ. That single-file discipline is what makes the Codex setup easier to reason about than the Claude Code scope stack, once the migration is behind you.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can I use Claude models in Codex CLI?&lt;/strong&gt; Not with vanilla Codex, which is OpenAI-only. Register an OpenAI-compatible gateway as a &lt;code&gt;model_provider&lt;/code&gt; and point a profile at &lt;code&gt;anthropic/claude-opus-4.8&lt;/code&gt;. That is the single surface with no native equivalent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Codex CLI read CLAUDE.md?&lt;/strong&gt; Not by default. It reads &lt;code&gt;AGENTS.md&lt;/code&gt;. Add &lt;code&gt;project_doc_fallback_filenames = ["AGENTS.md", "CLAUDE.md"]&lt;/code&gt; to keep the old file, or rename it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I import my Claude Code settings into Codex?&lt;/strong&gt; Run &lt;code&gt;codex&lt;/code&gt;, then &lt;code&gt;/import&lt;/code&gt;. Codex 0.140 added a selective importer for setup, project config, and recent chats. It does most of the work and reports the rest.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Codex CLI have hooks like Claude Code?&lt;/strong&gt; Yes, and they are on by default. Declare &lt;code&gt;[[hooks.Event]]&lt;/code&gt; blocks for events including &lt;code&gt;PreToolUse&lt;/code&gt;, &lt;code&gt;PostToolUse&lt;/code&gt;, &lt;code&gt;SessionStart&lt;/code&gt;, &lt;code&gt;Stop&lt;/code&gt;, &lt;code&gt;PreCompact&lt;/code&gt;, and &lt;code&gt;PostCompact&lt;/code&gt;. The only Claude Code hook with no equivalent is &lt;code&gt;ConfigChange&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can Claude Code and Codex share the same MCP servers?&lt;/strong&gt; Yes. The MCP processes are identical. Only the declaration moves, from JSON in &lt;code&gt;.mcp.json&lt;/code&gt; to TOML under &lt;code&gt;[mcp_servers.NAME]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I have to rewrite my Claude Code subagents for Codex?&lt;/strong&gt; You re-declare, not rewrite. The prompt body carries over; the wrapper moves from Markdown in &lt;code&gt;.claude/agents/&lt;/code&gt; to a standalone TOML file in &lt;code&gt;.codex/agents/&lt;/code&gt;. Subagents are on by default, so there is no flag to enable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is the AGENTS.md file the same as CLAUDE.md?&lt;/strong&gt; Same job, different name. &lt;code&gt;AGENTS.md&lt;/code&gt; is a cross-tool convention; &lt;code&gt;CLAUDE.md&lt;/code&gt; is Claude Code's own memory file. Content transfers directly.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/migrate-claude-code-to-codex-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claudecode</category>
      <category>codex</category>
      <category>migration</category>
    </item>
    <item>
      <title>Claude Sonnet 5 vs Opus 4.8 (2026): 60% Cheaper on Paper</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Wed, 01 Jul 2026 09:46:31 +0000</pubDate>
      <link>https://dev.to/owen_fox/claude-sonnet-5-vs-opus-48-2026-60-cheaper-on-paper-3l0</link>
      <guid>https://dev.to/owen_fox/claude-sonnet-5-vs-opus-48-2026-60-cheaper-on-paper-3l0</guid>
      <description>&lt;h1&gt;
  
  
  Claude Sonnet 5 vs Opus 4.8 (2026): 60% Cheaper on Paper
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Anthropic released Claude Sonnet 5 on June 30, 2026 at introductory pricing of &lt;strong&gt;$2/$10 per million tokens&lt;/strong&gt;, substantially below Opus 4.8's &lt;strong&gt;$5/$25&lt;/strong&gt; (standard rate after August 31 is $3/$15, still 40% lower). On capability, Opus 4.8 maintains leads in &lt;strong&gt;SWE-bench Pro 69.2% vs 63.2%&lt;/strong&gt; and approximately 6.6-point no-tools reasoning advantage. Two factors narrow the price gap: a &lt;strong&gt;new tokenizer&lt;/strong&gt; producing roughly 30% more tokens than Sonnet 4.6, and &lt;strong&gt;adaptive thinking enabled by default&lt;/strong&gt;, which Artificial Analysis estimates at approximately &lt;strong&gt;15% higher cost per agentic task than Opus 4.8&lt;/strong&gt;. The headline claims 60% savings. The actual invoice depends on workload characteristics. Below: complete pricing math, benchmark comparisons, two sample monthly invoices, and a routing strategy employing both models.&lt;/p&gt;

&lt;p&gt;Claude Sonnet 5 advertises 60% below Opus 4.8, but adaptive thinking and a new tokenizer mean an output-intensive agentic workload may cost the same or more. The discount applies to bounded output; the savings diminish on extended agent operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR: Which One Should You Pick?
&lt;/h2&gt;

&lt;p&gt;Most teams should adopt "Sonnet 5 as baseline, Opus 4.8 for demanding tasks." The verdict by use case follows.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Pick&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;High-volume classification / extraction / chat&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Sonnet 5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Bounded output, cheaper tokens, 40 to 60% lower bill&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAG answers, summarization, routine code edits&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Sonnet 5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Capability suffices; price advantage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hardest end-to-end agentic coding (SWE-bench Pro tier)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Opus 4.8&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;69.2% vs 63.2%, fewer iterations to resolve&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long-horizon reasoning, no tools&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Opus 4.8&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~6.6-point reasoning lead&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output-heavy agent loops with thinking on&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Measure first&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sonnet 5's per-task cost can exceed Opus&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost-sensitive default across mixed workload&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Route both&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Route inexpensive work to Sonnet 5, complex work to Opus 4.8&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This piece provides the evidence backing that matrix, plus a 10-line approach to test both against your own workload before committing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Specs Comparison
&lt;/h2&gt;

&lt;p&gt;Both models share the same nominal 1M context window and 128K maximum output. Price, tokenizer behavior, and default thinking strategy differentiate them.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Spec&lt;/th&gt;
&lt;th&gt;Claude Sonnet 5&lt;/th&gt;
&lt;th&gt;Claude Opus 4.8&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ofox model ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;anthropic/claude-sonnet-5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;anthropic/claude-opus-4.8&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input (intro, to Aug 31)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$2/M&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$5/M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output (intro, to Aug 31)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$10/M&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$25/M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input (standard, after Aug 31)&lt;/td&gt;
&lt;td&gt;$3/M&lt;/td&gt;
&lt;td&gt;$5/M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output (standard, after Aug 31)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$15/M&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$25/M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cached input read&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.2/M&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$0.5/M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cache write (5 min / 1 hr)&lt;/td&gt;
&lt;td&gt;$2.5 / $4 per M&lt;/td&gt;
&lt;td&gt;$6.25 / $10 per M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context window&lt;/td&gt;
&lt;td&gt;1M tokens&lt;/td&gt;
&lt;td&gt;1M tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Max output&lt;/td&gt;
&lt;td&gt;128K tokens&lt;/td&gt;
&lt;td&gt;128K tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tokenizer&lt;/td&gt;
&lt;td&gt;New (about +30% vs Sonnet 4.6)&lt;/td&gt;
&lt;td&gt;Prior-generation tokenizer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Adaptive thinking&lt;/td&gt;
&lt;td&gt;On by default&lt;/td&gt;
&lt;td&gt;On by default&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The introductory list pricing ($2/$10 and $5/$25) matches the ofox model pages as of July 1, 2026; the intro versus standard distinction and the August 31 transition derive from Anthropic's official pricing documentation. Note the standard output rate: post-introductory, Sonnet 5 reaches $15/M against Opus 4.8's $25/M, narrowing the output difference from 60% to 40%.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Price Gap Is Real. Here Is the Exact Math.
&lt;/h2&gt;

&lt;p&gt;Per-token rates show Sonnet 5 is genuinely less expensive, and cheaper across every dimension: input, output, and cached reads.&lt;/p&gt;

&lt;p&gt;Through August 31, 2026, Sonnet 5 costs $2/$10 versus Opus 4.8's $5/$25. That represents 60% reduction on input and output. Following August 31, the standard pricing of $3/$15 represents 40% reduction on both lines. Cached input reads at $0.2/M versus $0.5/M save 60%, maintaining regardless of promotional period and proving consequential for cache-heavy production deployments.&lt;/p&gt;

&lt;p&gt;Should your workload emphasize input tokens and generate limited, structured output, Sonnet 5 delivers exactly what marketing materials promise. Complications emerge with any workload generating substantial output, encompassing most agentic applications.&lt;/p&gt;

&lt;p&gt;One specification deserves emphasis beyond typical treatment: cached input. Sonnet 5 reads cached input at $0.2/M against Opus 4.8's $0.5/M. When prompts include sizable stable content (system directives, tool specifications, recurring document sets), prompt caching represents substantial savings, and Sonnet 5's cache read costs 60% less regardless of promotional pricing. A production retrieval system caching a 20K-token prefix across thousands of queries pays for that prefix at $0.2/M on Sonnet 5 versus $0.5/M on Opus 4.8. The complexity emerges on the write side: Sonnet 5 writes cache at $2.5/M (5-minute) or $4/M (1-hour) versus Opus 4.8's $6.25 and $10, meaning caching becomes economical faster on Sonnet 5, provided hit rates justify the write expense. Below roughly a 1:1 to 1.5:1 read-to-write proportion, caching increases expenses on either model.&lt;/p&gt;

&lt;h2&gt;
  
  
  The New Tokenizer, and Who It Actually Affects
&lt;/h2&gt;

&lt;p&gt;Sonnet 5 features a new tokenizer. This aspect of the release most frequently surprises on invoices and receives frequent misinterpretation.&lt;/p&gt;

&lt;p&gt;The confirmed details, from Anthropic's "What's new in Sonnet 5" documentation: equivalent input produces roughly 30% additional tokens on Sonnet 5 compared to Sonnet 4.6. Community testing indicates variation from 1.0 to 1.35x contingent on content. This does not constitute an API modification (requests, responses, and streaming maintain identical format), but it affects everything measured in tokens:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you measure&lt;/th&gt;
&lt;th&gt;Effect on Sonnet 5 vs Sonnet 4.6&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;usage&lt;/code&gt; token counts for the same text&lt;/td&gt;
&lt;td&gt;About 30% higher&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Text that fits in the 1M window&lt;/td&gt;
&lt;td&gt;Less, because each token covers less text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;max_tokens&lt;/code&gt; output budgets&lt;/td&gt;
&lt;td&gt;May truncate output sized for 4.6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Per-request cost at the same per-token price&lt;/td&gt;
&lt;td&gt;Higher for the same text&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A critical misunderstanding to prevent: this 30% measures &lt;strong&gt;against Sonnet 4.6, not against Opus 4.8&lt;/strong&gt;. Anthropic introduced comparable tokenizer evolution earlier, approximately with Opus 4.7, meaning Opus 4.8 operates a similar earlier-generation tokenizer. For identical content, Sonnet 5 and Opus 4.8 approach equivalent token consumption. The tokenizer penalty applies primarily when &lt;strong&gt;transitioning from Sonnet 4.6 to Sonnet 5&lt;/strong&gt; and repurposing established token limits, not when comparing Sonnet 5 and Opus 4.8.&lt;/p&gt;

&lt;p&gt;The operational takeaway: migrating from Sonnet 4.6 requires recount-ing prompts using the token-counting endpoint and reassessing any &lt;code&gt;max_tokens&lt;/code&gt; parameters close to projected output before depending on the "equivalent $3/$15 rate" narrative. Equivalent per-token cost, additional tokens, larger bill. The referenced "Claude Code token optimization guide" explains methods for recovering through caching and prompt compression.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coding Benchmark: SWE-bench Pro and the Real Gap
&lt;/h2&gt;

&lt;p&gt;Coding benchmarks contain noise, yet SWE-bench Pro merits discussion because it evaluates against actual GitHub issues end-to-end. The performance positions follow, including Sonnet 4.6 as reference.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;Sonnet 5&lt;/th&gt;
&lt;th&gt;Opus 4.8&lt;/th&gt;
&lt;th&gt;Sonnet 4.6&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SWE-bench Pro (agentic coding)&lt;/td&gt;
&lt;td&gt;63.2%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;69.2%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;58.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GDPval-AA v2 (knowledge work, Elo)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1,618&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1,615&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No-tools reasoning (gap)&lt;/td&gt;
&lt;td&gt;trails by ~6.6 pts&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;leads&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The SWE-bench Pro and GDPval-AA v2 numbers derive from MarkTechPost's compilation of Anthropic launch materials from June 30, 2026; the roughly 6.6-point no-tools reasoning gap originates from Anthropic's System Card (via digitalapplied.com and codingfleet.com), not MarkTechPost. Treat leaderboard rankings as temporal snapshots; consult Anthropic's Transparency Hub for individual benchmark sources. Two table elements determine most routing decisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Opus 4.8 preserves the 6-point SWE-bench Pro advantage.&lt;/strong&gt; Sonnet 5 at 63.2% represents substantial progress from Sonnet 4.6's 58.1%, though Opus 4.8's 69.2% establishes the benchmark for serious, multi-file agentic tasks. Six points on SWE-bench Pro distinguishes "resolves the issue immediately" from "resolves the issue after retry," and extended agent operations compound this into token expenditure. Tasks operating at that complexity tier find the less-expensive model paradoxically pricier due to retry economics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sonnet 5 marginally edges knowledge work.&lt;/strong&gt; The GDPval-AA v2 economic-work assessment shows Sonnet 5 ahead by three Elo points (1,618 to 1,615). That falls within statistical variance, yet the observation persists: for standard professional responsibilities not requiring maximum-difficulty coding, Sonnet 5 matches a substantially pricier competitor. Anthropic's positioning maintains that Sonnet 5's enhanced-effort mode reaches Opus 4.8 parity on certain tasks while maintaining broader cost-performance flexibility.&lt;/p&gt;

&lt;p&gt;Understanding what these benchmarks measure proves valuable before assigning relative weight. SWE-bench Pro evaluates models against actual unresolved GitHub issues end-to-end: the model examines the repository, produces a patch, and that patch either satisfies the project's concealed test requirements or fails. No partial scoring exists, explaining why absolute numbers appear lower versus multiple-choice evaluations. GDPval-AA v2 functions differently. It scores models on genuine economic knowledge tasks (composition, evaluation, structured reasoning) as an Elo score relative to competing models, so a 3-point margin represents essentially a coin flip while a 100-point spread denotes definitive advantage. Combined interpretation yields one unmistakable conclusion: Opus 4.8 performs substantially better at resolving difficult code problems, and Sonnet 5 achieves approximate parity for general professional deliverables. That premise supports routing rather than selecting a single model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing Math: Two Real Monthly Bills
&lt;/h2&gt;

&lt;p&gt;Marketing price constitutes one figure. Invoices reflect another reality. Two contrasting workloads below demonstrate opposite conclusions, with stated assumptions permitting customization.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario A, high-volume bounded output
&lt;/h3&gt;

&lt;p&gt;Support automation, categorization, data extraction. Assume 300M input tokens/month with 50% sourced from cache, and 30M output tokens/month.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;Sonnet 5 (intro)&lt;/th&gt;
&lt;th&gt;Sonnet 5 (standard)&lt;/th&gt;
&lt;th&gt;Opus 4.8&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;150M fresh input&lt;/td&gt;
&lt;td&gt;$300&lt;/td&gt;
&lt;td&gt;$450&lt;/td&gt;
&lt;td&gt;$750&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;150M cached input&lt;/td&gt;
&lt;td&gt;$30&lt;/td&gt;
&lt;td&gt;$30&lt;/td&gt;
&lt;td&gt;$75&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30M output&lt;/td&gt;
&lt;td&gt;$300&lt;/td&gt;
&lt;td&gt;$450&lt;/td&gt;
&lt;td&gt;$750&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Monthly total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$630&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$930&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$1,575&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vs Opus 4.8&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;60% less&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;41% less&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This scenario confirms the discount aligns with promotional claims. Bounded output ensures reduced per-token pricing translates directly to final cost reduction.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario B, agentic coding
&lt;/h3&gt;

&lt;p&gt;Extended multi-phase operations, thinking enabled by default. Assume 5 developers, 25 tasks per day each, 20 workdays (2,500 tasks monthly). Per-task specification: 60K input across both. Output: 12K on Opus 4.8, approximately 30K on Sonnet 5 due to adaptive thinking enabled by default generating increased reasoning per task.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;Sonnet 5 (intro)&lt;/th&gt;
&lt;th&gt;Sonnet 5 (standard)&lt;/th&gt;
&lt;th&gt;Opus 4.8&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Input per task (60K)&lt;/td&gt;
&lt;td&gt;$0.12&lt;/td&gt;
&lt;td&gt;$0.18&lt;/td&gt;
&lt;td&gt;$0.30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output per task&lt;/td&gt;
&lt;td&gt;$0.30 (30K)&lt;/td&gt;
&lt;td&gt;$0.45 (30K)&lt;/td&gt;
&lt;td&gt;$0.30 (12K)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost per task&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.42&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.63&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.60&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Monthly (2,500 tasks)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$1,050&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$1,575&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$1,500&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vs Opus 4.8&lt;/td&gt;
&lt;td&gt;30% less&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5% more&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;At standard pricing, an output-intensive agentic workload may cost slightly &lt;strong&gt;more&lt;/strong&gt; on Sonnet 5 than Opus 4.8, since additional thinking tokens accumulate on the output line. My reference calculation indicates +5%; Artificial Analysis's independent cost assessment estimated closer to +15% ($2.29 per task versus Opus, late June 2026 measurement). The precise percentage varies with task-specific thinking volume. The trend does not: &lt;strong&gt;the advertised discount does not persist with extended agent operations.&lt;/strong&gt; This constitutes the most crucial insight before deploying agents using Sonnet 5.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Pick Claude Sonnet 5
&lt;/h2&gt;

&lt;p&gt;Select &lt;code&gt;anthropic/claude-sonnet-5&lt;/code&gt; when production output stays bounded and transaction scale runs high. Specifically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Classification, extraction, routing, moderation.&lt;/strong&gt; Concise responses, massive input throughput, frequently cache-optimized. Sonnet 5's $2/$10 and $0.2/M cached rates reduce these expenses 40 to 60%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RAG answers and summarization.&lt;/strong&gt; Information retrieval executes heavy computation; the model produces constrained output. Capability meets requirements; price delivers advantage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routine coding.&lt;/strong&gt; Single-file revisions, boilerplate generation, test formation, code feedback. Sonnet 5's 63.2% SWE-bench Pro exceeds requirements for non-frontier effort.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chat and assistant interfaces.&lt;/strong&gt; User exchanges involve concise turns; Sonnet 5's velocity and rate align more favorably than Opus-category solutions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When to Pick Claude Opus 4.8
&lt;/h2&gt;

&lt;p&gt;Select &lt;code&gt;anthropic/claude-opus-4.8&lt;/code&gt; when challenge degree justifies premium cost relative to first-attempt failure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontier agentic coding.&lt;/strong&gt; The 6-point SWE-bench Pro advantage represents the difference between single versus repeated attempts. Complex multi-file problems resolve with fewer iterations on Opus 4.8, meaning reduced token consumption. The model receives comprehensive coverage in the referenced "Opus 4.8 release review."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complex reasoning without tools.&lt;/strong&gt; The roughly 6.6-point no-tools reasoning advantage demonstrates as "reasoning persists coherently" during intricate sequential problems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output-heavy agent loops where Sonnet 5 measurement shows equivalent or higher pricing.&lt;/strong&gt; When per-task expense proves identical either way, prefer the model displaying higher benchmark performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When Not to Pick Either (and What to Do Instead)
&lt;/h2&gt;

&lt;p&gt;The error involves treating this as an either-or selection. Most production systems handle mixed traffic: significant volume of inexpensive constrained operations alongside a minority of authentically complex tasks. Concentrating everything on one model either overspends on accessible 80% or underperforms on challenging 20%.&lt;/p&gt;

&lt;p&gt;The remedy employs routing. Direct inexpensive, high-volume operations to Sonnet 5 and complex work to Opus 4.8, consolidated under unified endpoint architecture permitting model switching as straightforward parameter adjustment, not system redesign. This methodology and corresponding routing signal selection appear in the referenced "Claude Code hybrid routing pattern" writeup. Both models function on equivalent OpenAI-compatible API via ofox, rendering a router a dictionary operation rather than dual SDK integration.&lt;/p&gt;

&lt;p&gt;Routing implementation complexity stems not from architecture but from logic: determining pre-execution whether a task merits Opus 4.8 rather than Sonnet 5? Three signals function effectively. Request token volume offers the cheapest proxy, since higher-context submissions typically constitute multi-file, comprehensive tasks benefiting from Opus 4.8. Task classification from application systems (extraction versus open-ended operations) delivers superior accuracy when presently available. Validation fallback operates as backup: execute Sonnet 5 initially, escalate to Opus 4.8 exclusively when cheaper-model output fails verification. Escalation constraint keeps Opus utilization modest, the routing objective, since Opus remains the premium tier deployed minimally.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowchart TD
    A[Incoming request] --&amp;gt; B{Bounded output?&amp;lt;br/&amp;gt;classification, RAG, chat}
    B --&amp;gt;|Yes| C[anthropic/claude-sonnet-5]
    B --&amp;gt;|No| D{Frontier coding or&amp;lt;br/&amp;gt;long-horizon reasoning?}
    D --&amp;gt;|Yes| E[anthropic/claude-opus-4.8]
    D --&amp;gt;|No, measure it| F[A/B both, pick lower per-task cost]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Try Both via ofox: A/B in 10 Lines
&lt;/h2&gt;

&lt;p&gt;Resolving this definitively requires executing both against your actual workload and analyzing token metrics. ofox presents both models via unified OpenAI-compatible gateway (&lt;code&gt;https://api.ofox.ai/v1&lt;/code&gt;), permitting comparison where exclusively the model ID string varies between evaluations. One critical detail: Sonnet 5 rejects non-standard &lt;code&gt;temperature&lt;/code&gt;, &lt;code&gt;top_p&lt;/code&gt;, and &lt;code&gt;top_k&lt;/code&gt; parameters with a 400 response, so maintain default sampling configurations (examples maintain this requirement).&lt;/p&gt;

&lt;h3&gt;
  
  
  Python: A/B both models in one loop
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.ofox.ai/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_OFOX_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Refactor this function to remove the nested loop: ...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;anthropic/claude-sonnet-5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;anthropic/claude-opus-4.8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;usage&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;prompt_tokens&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completion_tokens&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Examine the &lt;code&gt;completion_tokens&lt;/code&gt; across each. That metric, multiplied by output expense, identifies where the "budget-friendly" alternative ceases cost advantage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Node: same shape
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;OpenAI&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;openai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;baseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.ofox.ai/v1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OFOX_KEY&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Refactor this function to remove the nested loop: ...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;anthropic/claude-sonnet-5&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;anthropic/claude-opus-4.8&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;prompt_tokens&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completion_tokens&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Execute this against 20 to 30 representative cases, aggregate input and output tokens per model, and apply rates from the specification table. That computation exceeds any benchmark for determining appropriate model routing. Complete Claude pricing evaluation appears in the referenced "Claude API pricing guide."&lt;/p&gt;

&lt;h2&gt;
  
  
  Migration Gotchas: What Breaks Moving to Sonnet 5
&lt;/h2&gt;

&lt;p&gt;Sonnet 5 functions as structural replacement for Sonnet 4.6, but three behavioral alterations trigger 400 responses when existing code assumes 4.6 defaults. These likewise apply relative to Opus 4.8 code predominantly.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Change&lt;/th&gt;
&lt;th&gt;Old behavior&lt;/th&gt;
&lt;th&gt;On Sonnet 5&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sampling params&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;temperature&lt;/code&gt;/&lt;code&gt;top_p&lt;/code&gt;/&lt;code&gt;top_k&lt;/code&gt; accepted&lt;/td&gt;
&lt;td&gt;Non-default values return 400&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manual extended thinking&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;budget_tokens&lt;/code&gt; accepted on some models&lt;/td&gt;
&lt;td&gt;Returns 400; use adaptive thinking + &lt;code&gt;effort&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Default thinking&lt;/td&gt;
&lt;td&gt;Off unless requested (4.6)&lt;/td&gt;
&lt;td&gt;Adaptive thinking on by default; pass &lt;code&gt;thinking: {type: "disabled"}&lt;/code&gt; to turn off&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;max_tokens&lt;/code&gt; sizing&lt;/td&gt;
&lt;td&gt;Tuned for 4.6 token counts&lt;/td&gt;
&lt;td&gt;May truncate; new tokenizer emits more tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;max_tokens&lt;/code&gt; element represents the concealed failure vector. Output limits calibrated against Sonnet 4.6 generate additional tokens for equivalent content on Sonnet 5 and may reach ceilings mid-generation. Increase budgets or incomplete responses ship. A new protective mechanism warrants awareness: Sonnet 5 introduces initial-release cybersecurity barriers, yielding successful HTTP 200 with &lt;code&gt;stop_reason: "refusal"&lt;/code&gt; rather than fault states, necessitating explicit stop-reason handling.&lt;/p&gt;

&lt;p&gt;Adaptive thinking drives the most substantial billing modifications, accompanied by configuration control. Replacing the earlier &lt;code&gt;budget_tokens&lt;/code&gt; parameter, Sonnet 5 supplies an &lt;code&gt;effort&lt;/code&gt; setting (low, medium, high) adjusting reasoning intensity relative to token economics. Should Sonnet 5 migration for Opus 4.8 operations expect savings yet invoices arrive flat, first investigate lowering effort on operations not requiring intensive reasoning. Maximum effort categorizing information represents pure inefficiency, accounting for substantial surprise expense in case B. Calibrate effort deliberately per application pathway rather than defaulting all queries.&lt;/p&gt;

&lt;p&gt;The successful migration validation does not depend on benchmark outcomes. It centers on completion_tokens: test both models on your operations, permitting token volume, not promotional pricing, to establish routing.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is Claude Sonnet 5 better than Opus 4.8?&lt;/strong&gt; Performance varies by application. Opus 4.8 dominates SWE-bench Pro (69.2% versus 63.2%) and logical reasoning (roughly 6.6-point advantage). Sonnet 5 surpasses professional knowledge tasks (GDPval-AA v2: 1,618 to 1,615) and offers superior value. Sonnet 5 serves as appropriate baseline; Opus 4.8 merits premium investment on maximally difficult assignments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much cheaper is Claude Sonnet 5 than Opus 4.8?&lt;/strong&gt; 60% reduction during introductory window ($2/$10 through August 31, 2026), 40% reduction at subsequent $3/$15 tier. Cached input costs 60% reduction consistently ($0.2/M versus $0.5/M).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Claude Sonnet 5 use a new tokenizer?&lt;/strong&gt; Affirmative; it generates roughly 30% additional tokens compared to Sonnet 4.6 for equivalent content. This represents no API modification, yet necessitates prompt recalculation and &lt;code&gt;max_tokens&lt;/code&gt; reconsideration when transitioning from 4.6.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does Claude Sonnet 5 cost more per task than the price suggests?&lt;/strong&gt; Adaptive thinking functions by default, generating surplus output tokens per operation. Artificial Analysis approximated roughly $2.29 per operation, approximately 15% exceeding Opus 4.8 on their agentic assessment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is Claude Sonnet 5 good for coding?&lt;/strong&gt; Satisfactory for general coding (63.2% SWE-bench Pro, elevated from 58.1% on Sonnet 4.6). Direct most difficult agentic challenges to Opus 4.8.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I switch from Opus 4.8 to Sonnet 5?&lt;/strong&gt; Transition the high-volume limited-output portion and cut that expense 40 to 60%. Maintain Opus 4.8 for complex operations. Apply routing rather than comprehensive replacement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the context window of Claude Sonnet 5?&lt;/strong&gt; 1M tokens, 128K maximum output. The new tokenizer means that capacity retains less actual content than equivalent specification on Sonnet 4.6.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I set temperature on Claude Sonnet 5?&lt;/strong&gt; Negative. Non-standard &lt;code&gt;temperature&lt;/code&gt;, &lt;code&gt;top_p&lt;/code&gt;, or &lt;code&gt;top_k&lt;/code&gt; triggers a 400 response. Eliminate them and influence output via system guidance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources Checked for This Refresh
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic, "What's new in Claude Sonnet 5" documentation (tokenizer, behavioral modifications, pricing), confirmed July 1, 2026: &lt;a href="https://platform.claude.com/docs/en/about-claude/models/whats-new-sonnet-5" rel="noopener noreferrer"&gt;https://platform.claude.com/docs/en/about-claude/models/whats-new-sonnet-5&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, "Introducing Claude Sonnet 5" announcement, June 30, 2026: &lt;a href="https://www.anthropic.com/news/claude-sonnet-5" rel="noopener noreferrer"&gt;https://www.anthropic.com/news/claude-sonnet-5&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic Transparency Hub (individual benchmark information): &lt;a href="https://www.anthropic.com/transparency" rel="noopener noreferrer"&gt;https://www.anthropic.com/transparency&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MarkTechPost benchmark compilation (SWE-bench Pro, GDPval-AA v2 only), June 30, 2026&lt;/li&gt;
&lt;li&gt;Anthropic System Card via digitalapplied.com and codingfleet.com (no-tools reasoning gap, roughly 6.6 points)&lt;/li&gt;
&lt;li&gt;Artificial Analysis cost-to-run assessment ($2.29/operation), late June 2026 measurement&lt;/li&gt;
&lt;li&gt;ofox model pages for &lt;code&gt;anthropic/claude-sonnet-5&lt;/code&gt; and &lt;code&gt;anthropic/claude-opus-4.8&lt;/code&gt; (introductory list pricing $2/$10 and $5/$25, context specification), verified July 1, 2026; introductory/standard classification and August 31 changeover per Anthropic's pricing documentation&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/claude-sonnet-5-vs-opus-4-8-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>modelcomparison</category>
      <category>anthropic</category>
    </item>
    <item>
      <title>How to Choose an AI Model: 3 Questions, Not the Biggest One</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Wed, 01 Jul 2026 09:20:36 +0000</pubDate>
      <link>https://dev.to/owen_fox/how-to-choose-an-ai-model-3-questions-not-the-biggest-one-5d71</link>
      <guid>https://dev.to/owen_fox/how-to-choose-an-ai-model-3-questions-not-the-biggest-one-5d71</guid>
      <description>&lt;h1&gt;
  
  
  How to Choose an AI Model: 3 Questions, Not the Biggest One
&lt;/h1&gt;

&lt;p&gt;The most common mistake when picking an AI model is reaching for the one with the most parameters and the highest benchmark score.&lt;/p&gt;

&lt;p&gt;It feels obvious. Opus beats Haiku, so use Opus. In real projects that logic is usually backwards. A bigger model costs more, runs slower, and (the least intuitive part) overthinks simple work. Ask it to clean up a sentence and it hands you a short essay with three alternatives and a note on edge cases.&lt;/p&gt;

&lt;p&gt;The better order is the reverse: get the job working on the smallest model that's good enough, then move up only when you hit a quality ceiling. That isn't a hunch. A recent AWS write-up sums it up in four words: "Start small. Justify up."&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "bigger is better" is a trap
&lt;/h2&gt;

&lt;p&gt;Model size is really a difference in parameter count. More parameters means more variables the model can hold at once, which helps on complex, ambiguous, multi-step problems. That capability has a price, and on simple tasks you never earn it back:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cost.&lt;/strong&gt; Within the same vendor, a flagship model often costs tens of times more per token than its light version. At tens of thousands of calls a day, that gap decides whether the project is sustainable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency.&lt;/strong&gt; Bigger models emit tokens slower. For real-time chat or autocomplete, "smarter" gets cancelled out by "laggier."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overthinking.&lt;/strong&gt; This one is the sneakiest. Hand a flagship model a text-classification job and it may return reasoning, a confidence score, and notes on boundary cases. You wanted one label. Surplus capability on a simple task isn't an advantage, it's noise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A rough but useful analogy: ask "what's for dinner" and a toddler can't answer, but an adult asks about your budget, your allergies, and how spicy you want it. The adult is stronger, yet all you needed was "the noodle place downstairs." Most AI tasks are noodle-place tasks. They don't need an expert.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three questions: subtract within a budget
&lt;/h2&gt;

&lt;p&gt;So how do you actually pick? Set a cost ceiling first: at your real call volume, what's the most you can spend per month. That line bounds your candidates. Then, inside it, ask three questions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Go smaller&lt;/th&gt;
&lt;th&gt;Go bigger&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Task complexity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Classification, summaries, formatting, extraction&lt;/td&gt;
&lt;td&gt;Complex code, long-chain reasoning, legal/medical judgment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Call volume&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High-frequency, batch (tens of thousands/day)&lt;/td&gt;
&lt;td&gt;Low-frequency, one-off (dozens/day)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost of error&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A retry fixes it&lt;/td&gt;
&lt;td&gt;One mistake is expensive (wrong math, misleading a user)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The more you land in the "go bigger" column, the more a stronger model earns its keep. Otherwise a light model is almost always the better answer. Notice this is subtraction: the default is small, and every step up needs a specific reason, not "the strongest can't hurt."&lt;/p&gt;

&lt;p&gt;A few concrete calls: customer-support replies are high-volume and error-tolerant, so a light model plus a fallback is plenty. Code review is complex and low-tolerance, so it's worth a flagship. Long-document summarization isn't complex but needs a big context window, so reach for a cheap long-context model rather than the priciest flagship.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lazy way: let a tool shortlist for you
&lt;/h2&gt;

&lt;p&gt;You can carry all of this in your head: which model is cheapest, which has the longest context, which is strongest at code. But with 100-plus models and prices that move every week, memory-based selection goes stale fast.&lt;/p&gt;

&lt;p&gt;The easier route is a finder tool. OfoxAI built one (ofox.ai/en/model-finder) that follows the same three questions and does the legwork for you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pick a use case.&lt;/strong&gt; Answer "what are you building": coding, AI agents, RAG / long documents, general chat, writing, data extraction, translation, vision, roleplay, image generation, embeddings. Choose the closest one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read the ranking.&lt;/strong&gt; It scores 100+ models on &lt;strong&gt;quality, price, and speed&lt;/strong&gt; and covers 15 popular lists: best for coding, best for agents, best for RAG, cheapest, fastest, best for long context (100K+), and so on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Copy the shortlist.&lt;/strong&gt; Each list is ranked. If you don't want to run your own tests, try the top two or three.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It needs no signup, runs in the browser, and pulls live prices, so you're not looking at a six-month-old number. It's basically the three questions turned into a one-minute interaction, which beats guessing off a static leaderboard.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For where a specific model lands on benchmarks and price, pair this with the May 2026 AI model rankings: the finder narrows the field fast, the rankings explain each candidate in detail.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  After you choose: one key for every model
&lt;/h2&gt;

&lt;p&gt;Choosing is step one. The mature pattern is tiered routing: simple tasks go to a light model, mid tasks to a mid-tier, and only the hardest slice hits a flagship. You keep quality where it matters and push the bulk of the cost onto cheap models.&lt;/p&gt;

&lt;p&gt;That only works if switching models is easy. Registering, topping up, and wiring different auth and billing for each vendor is a special kind of misery. OfoxAI supports 100+ models and is compatible with the OpenAI, Anthropic, and Gemini protocols. Point your existing code at &lt;code&gt;api.ofox.ai/v1&lt;/code&gt; and one key calls all of them, billed per token with no monthly fee. Swapping a model is swapping one string.&lt;/p&gt;

&lt;p&gt;For how to wire the routing itself, see one API for every model and why you'd put an LLM gateway in front.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;Back to the opening line: don't pick a model by cutting down from the strongest, build up from good-enough.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Default to a light model and get the business logic working.&lt;/li&gt;
&lt;li&gt;Use the three questions (complexity / volume / cost of error) to decide which parts deserve an upgrade.&lt;/li&gt;
&lt;li&gt;When unsure, open the finder, pick a use case, read the ranking, decide in ten minutes.&lt;/li&gt;
&lt;li&gt;Wire it with one key so swapping models stays cheap.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most expensive model isn't the one that fits you best. Run two or three candidates on your own real prompts and compare the output. That tells you more than any benchmark report, and faster. When you're ready, grab a free API key and start testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources Checked for This Refresh
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AWS, Bigger AI Models Aren't Always Better: Here's How to Actually Choose, verified 2026-06-30&lt;/li&gt;
&lt;li&gt;OfoxAI model finder: use-case ranking, quality/price/speed scoring, live pricing, verified 2026-06-30&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/how-to-choose-ai-model-not-the-biggest/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>modelselection</category>
      <category>modelcomparison</category>
      <category>apiguide</category>
    </item>
    <item>
      <title>Codex "command failed; retry without sandbox": 6 Fixes (2026)</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Mon, 29 Jun 2026 09:28:02 +0000</pubDate>
      <link>https://dev.to/owen_fox/codex-command-failed-retry-without-sandbox-6-fixes-2026-4ff4</link>
      <guid>https://dev.to/owen_fox/codex-command-failed-retry-without-sandbox-6-fixes-2026-4ff4</guid>
      <description>&lt;h2&gt;
  
  
  Codex Asking to "Retry Without Sandbox" on Every Command? The 30-Second Diagnosis
&lt;/h2&gt;

&lt;p&gt;You run Codex, it tries to edit a file or run a command, and you get this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;command failed; retry without sandbox?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Run these three checks in order. The first one that comes back wrong is your fix.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;codex --version              # note the version; 0.115–0.118 had regressions
command -v bwrap             # Linux/WSL2: expect a path; empty = sandbox can't start
grep -E 'approval_policy|sandbox_mode' ~/.codex/config.toml   # check your settings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;Jump to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;bwrap&lt;/code&gt; empty on Linux/WSL2&lt;/td&gt;
&lt;td&gt;The sandbox cannot launch, so every command fails into the prompt&lt;/td&gt;
&lt;td&gt;Fix 1 (install bubblewrap)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;approval_policy = "untrusted"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;You told Codex to ask before every command&lt;/td&gt;
&lt;td&gt;Fix 2 (set on-request)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sandbox_mode = "read-only"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Edits are blocked by design and escalate&lt;/td&gt;
&lt;td&gt;Fix 3 (workspace-write)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Network commands fail (&lt;code&gt;npm&lt;/code&gt;, &lt;code&gt;git fetch&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Sandbox blocks outbound network&lt;/td&gt;
&lt;td&gt;Fix 4 (network_access)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Version in 0.115–0.121 range&lt;/td&gt;
&lt;td&gt;Known &lt;code&gt;apply_patch&lt;/code&gt; regression&lt;/td&gt;
&lt;td&gt;Fix 5 (pin / upgrade)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;macOS, only some commands prompt&lt;/td&gt;
&lt;td&gt;Real write/network outside workspace&lt;/td&gt;
&lt;td&gt;Fix 6 (widen roots)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This article is about &lt;strong&gt;execution and sandbox/approval errors&lt;/strong&gt; at runtime: the &lt;code&gt;command failed; retry without sandbox&lt;/code&gt; prompt and the "every command needs approval" loop. If your problem is &lt;code&gt;codex: command not found&lt;/code&gt; right after install, that is a PATH problem, not a sandbox problem; see &lt;a href="https://ofox.ai/blog/codex-command-not-found-fix-npm-install-2026/" rel="noopener noreferrer"&gt;codex: command not found? 7 fixes for npm install&lt;/a&gt;. For the full list of &lt;code&gt;config.toml&lt;/code&gt; keys this post touches, the &lt;a href="https://ofox.ai/blog/codex-cli-config-toml-deep-dive/" rel="noopener noreferrer"&gt;Codex CLI config.toml deep dive&lt;/a&gt; is the reference.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Prompt Actually Is (Sandbox vs Approval)
&lt;/h2&gt;

&lt;p&gt;Codex runs your model's commands behind two separate controls. People mix them up, and that confusion is half the reason this prompt is so annoying.&lt;/p&gt;

&lt;p&gt;The first control is the &lt;strong&gt;sandbox&lt;/strong&gt;. It sets the technical boundary for what a command can touch: which files it can write, whether it can reach the network. There are three modes, and these are the exact value strings the CLI accepts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;read-only&lt;/code&gt;: Codex can read files and run commands that do not write&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;workspace-write&lt;/code&gt;: Codex can read and edit inside the current workspace and run routine local commands (this is the interactive default)&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;danger-full-access&lt;/code&gt;: no filesystem or network restriction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second control is the &lt;strong&gt;approval policy&lt;/strong&gt;. It decides &lt;em&gt;when&lt;/em&gt; Codex stops and asks you before crossing the sandbox boundary. The accepted values:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;untrusted&lt;/code&gt;: ask before running anything&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;on-request&lt;/code&gt;: the model runs routine work itself and asks only when it needs to step outside the boundary (interactive default)&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;never&lt;/code&gt;: never ask; if something is not allowed, it just fails&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;a href="https://developers.openai.com/codex/concepts/sandboxing" rel="noopener noreferrer"&gt;official Codex sandboxing docs&lt;/a&gt; state the relationship directly: the sandbox defines the technical boundaries, and the approval policy decides when Codex must stop and ask before crossing them. The two work together.&lt;/p&gt;

&lt;p&gt;So where does &lt;code&gt;command failed; retry without sandbox?&lt;/code&gt; come from? A command ran, the sandbox layer caused it to exit non-zero, and the approval policy reacted by offering to run the same command again &lt;em&gt;outside&lt;/em&gt; the sandbox once you say yes. The wording suggests "your code needs more permission," but very often the command would have been fine. The sandbox itself failed to start, or a regression mislabeled a normal edit as a denial.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;model wants to run a command
        │
        ▼
  sandbox_mode applies the boundary  ──► command runs clean ──► done
        │
        ▼ (command exits non-zero under the sandbox)
  approval_policy reacts
        │
        ▼
  "command failed; retry without sandbox?"  ──► you approve ──► reruns unsandboxed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Keep that split in mind. Almost every fix below is either "make the sandbox able to do its job" or "tell the approval policy to stop interrupting routine work."&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Fix This, When to Switch Versions, and When to Just Approve
&lt;/h2&gt;

&lt;p&gt;Before you change anything, decide which bucket you are in. This saves you from rewriting a config that was never the problem.&lt;/p&gt;

&lt;p&gt;Fix the config if &lt;code&gt;bwrap&lt;/code&gt; is missing, or your &lt;code&gt;approval_policy&lt;/code&gt;/&lt;code&gt;sandbox_mode&lt;/code&gt; are set to something stricter than you want. This is the majority of cases and the rest of the article covers it.&lt;/p&gt;

&lt;p&gt;Switch versions if you are on a release with a known regression and a clean config plus bubblewrap still triggers the prompt on ordinary edits. Several 2026 builds shipped &lt;code&gt;apply_patch&lt;/code&gt; regressions; pin to a good one or upgrade past it.&lt;/p&gt;

&lt;p&gt;Just approve and move on if the prompt only shows up rarely, on a command that genuinely reaches the network or writes outside your project. That is the sandbox doing its job. Approving once is faster than re-architecting your setup for a one-off.&lt;/p&gt;

&lt;p&gt;Stop rule: if you only see the prompt once or twice an hour on real network/out-of-workspace commands, you do not have a bug. Approve it and keep working. The fixes below are for the "every single command" case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Codex Sandbox and Approval Errors: What Each One Means
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Most likely cause&lt;/th&gt;
&lt;th&gt;Where it bites&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;command failed; retry without sandbox?&lt;/code&gt; on &lt;strong&gt;every&lt;/strong&gt; edit&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;bwrap&lt;/code&gt; not installed (Linux/WSL2); sandbox can't launch&lt;/td&gt;
&lt;td&gt;Linux, WSL2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Same prompt, but only on &lt;code&gt;apply_patch&lt;/code&gt; edits&lt;/td&gt;
&lt;td&gt;Version regression mislabeling normal writes&lt;/td&gt;
&lt;td&gt;0.115–0.121 builds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"asks before every command"&lt;/td&gt;
&lt;td&gt;&lt;code&gt;approval_policy = "untrusted"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;All platforms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edits silently refused / escalated&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sandbox_mode = "read-only"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;All platforms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;npm install&lt;/code&gt; / &lt;code&gt;git fetch&lt;/code&gt; fail under sandbox&lt;/td&gt;
&lt;td&gt;Network blocked inside &lt;code&gt;workspace-write&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;All platforms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Writes to a path outside the repo fail&lt;/td&gt;
&lt;td&gt;Path not in &lt;code&gt;writable_roots&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;macOS, Linux&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sandbox startup warning at launch&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;bwrap&lt;/code&gt; missing or user namespaces disabled&lt;/td&gt;
&lt;td&gt;Linux, WSL2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The single most common root cause on Linux is the first row. The Codex docs are explicit that on Linux and WSL2 you install bubblewrap first; Codex uses the first &lt;code&gt;bwrap&lt;/code&gt; it finds on PATH and falls back to a bundled helper that needs unprivileged user namespaces. If neither is available, Codex prints a startup warning, and from then on every sandboxed command fails into the retry prompt. That is exactly the behavior reported in issue #19162, where every file edit failed starting around version 0.115.0, and a maintainer's first question was whether bubblewrap was installed per the sandboxing prerequisites.&lt;/p&gt;

&lt;p&gt;Which mechanism enforces the sandbox depends entirely on your platform, and that decides whether you have anything to install at all:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Sandbox mechanism&lt;/th&gt;
&lt;th&gt;Extra install needed?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;macOS&lt;/td&gt;
&lt;td&gt;Built-in Seatbelt framework&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;bubblewrap&lt;/code&gt; (&lt;code&gt;bwrap&lt;/code&gt;), or bundled helper via user namespaces&lt;/td&gt;
&lt;td&gt;Yes, install bubblewrap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WSL2 (Ubuntu)&lt;/td&gt;
&lt;td&gt;Linux sandbox path, same as Linux&lt;/td&gt;
&lt;td&gt;Yes, install bubblewrap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows (PowerShell)&lt;/td&gt;
&lt;td&gt;Native Windows sandbox&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you are on macOS or Windows PowerShell and still get the prompt on every command, the cause is almost never the sandbox mechanism itself; jump to Fix 2 (approval policy) or Fix 5 (version regression). The "install something" fixes are a Linux and WSL2 story.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Fix It (Solutions for Every Setup)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Fix 1 (Linux/WSL2): Install bubblewrap
&lt;/h3&gt;

&lt;p&gt;This is the fix for the "every command needs approval" case on Linux. The &lt;code&gt;workspace-write&lt;/code&gt; sandbox needs &lt;code&gt;bwrap&lt;/code&gt; to enforce its boundary. Without it, commands cannot run sandboxed, so they fail and escalate.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Debian / Ubuntu / WSL2 (Ubuntu)
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install -y bubblewrap

# Fedora
sudo dnf install -y bubblewrap

# Arch
sudo pacman -S bubblewrap

command -v bwrap   # expect /usr/bin/bwrap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Restart Codex after installing. The startup warning should disappear and edits should stop prompting. If &lt;code&gt;bwrap&lt;/code&gt; is installed but the prompt persists, your kernel may have unprivileged user namespaces disabled, or an AppArmor profile is blocking bubblewrap. Check:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat /proc/sys/kernel/unprivileged_userns_clone   # expect 1 (or the file absent on newer kernels)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;On Ubuntu 25.10 specifically (issue #17134), users hit AppArmor restrictions around &lt;code&gt;bwrap&lt;/code&gt;. Recent Ubuntu releases ship an AppArmor policy that restricts unprivileged user namespaces, which is exactly what the bundled helper relies on. If you are on a hardened kernel, you may need to allow the relevant AppArmor profile for bubblewrap; on a normal desktop Ubuntu the &lt;code&gt;apt-get install&lt;/code&gt; above is enough, because the system &lt;code&gt;bwrap&lt;/code&gt; is allowed by its own profile. The order of preference is: install the system &lt;code&gt;bwrap&lt;/code&gt; package first (it carries a working profile), and only touch AppArmor settings if the package is present but namespace creation still fails.&lt;/p&gt;

&lt;p&gt;macOS users skip this fix entirely. macOS uses the built-in Seatbelt framework, so the sandbox works without any extra install. If a macOS run prompts on every command, you are looking at a config or version issue, not a missing sandbox binary.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 2: Set approval_policy to on-request
&lt;/h3&gt;

&lt;p&gt;If Codex asks before &lt;em&gt;every&lt;/em&gt; command and &lt;code&gt;bwrap&lt;/code&gt; is present, your approval policy is too strict. The value &lt;code&gt;untrusted&lt;/code&gt; means "ask before running anything," which is correct only if you want to vet each step.&lt;/p&gt;

&lt;p&gt;Edit &lt;code&gt;~/.codex/config.toml&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;approval_policy = "on-request"
sandbox_mode   = "workspace-write"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;With &lt;code&gt;on-request&lt;/code&gt;, Codex runs routine reads, edits, and local commands itself and asks only when it needs to step outside the workspace or reach the network. You can also set it per-run without touching the file:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;codex --ask-for-approval on-request --sandbox workspace-write
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The short forms are &lt;code&gt;-a&lt;/code&gt; for &lt;code&gt;--ask-for-approval&lt;/code&gt; and &lt;code&gt;-s&lt;/code&gt; for &lt;code&gt;--sandbox&lt;/code&gt;, both documented in the &lt;a href="https://developers.openai.com/codex/cli/reference" rel="noopener noreferrer"&gt;Codex CLI command-line reference&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 3: Move off read-only so edits are allowed
&lt;/h3&gt;

&lt;p&gt;If &lt;code&gt;sandbox_mode = "read-only"&lt;/code&gt;, Codex cannot write at all, so any edit it tries either gets refused or escalates into the retry prompt. For normal coding work you want &lt;code&gt;workspace-write&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sandbox_mode = "workspace-write"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;read-only&lt;/code&gt; is useful when you want Codex to analyze a repo without changing anything. It is the wrong mode the moment you ask it to edit code, and the retry prompt is the symptom.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 4: Allow network without dropping the sandbox
&lt;/h3&gt;

&lt;p&gt;A frequent overreaction is jumping straight to &lt;code&gt;danger-full-access&lt;/code&gt; because &lt;code&gt;npm install&lt;/code&gt; or &lt;code&gt;git fetch&lt;/code&gt; failed. You do not need to. The &lt;code&gt;workspace-write&lt;/code&gt; sandbox blocks outbound network by default, but you can turn it on inside the sandbox:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sandbox_mode = "workspace-write"

[sandbox_workspace_write]
network_access = true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;That keeps the filesystem boundary intact while letting package installs and fetches through. Reach for &lt;code&gt;danger-full-access&lt;/code&gt; only when you genuinely need both unrestricted filesystem and network, and prefer to do that inside a container.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 5: Pin past the apply_patch regression
&lt;/h3&gt;

&lt;p&gt;If bubblewrap is installed, your config is clean, and ordinary edits &lt;em&gt;still&lt;/em&gt; prompt, you are probably on a build with the regression. The reports:&lt;/p&gt;

&lt;p&gt;Issue #16407 pinned a regression to version 0.118.0, where &lt;code&gt;apply_patch&lt;/code&gt; entered a patch-approval loop with the retry prompt, while 0.117.0 worked. Issue #19162 reported the behavior starting around 0.115.0, affecting nearly every file edit. Issue #18079 described the prompt as misleading: bubblewrap and filesystem writes worked, yet &lt;code&gt;apply_patch&lt;/code&gt; still asked to retry without sandbox.&lt;/p&gt;

&lt;p&gt;If you are stuck on a bad version, pin to a known-good one or move forward to a fixed release:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# pin to a specific version
npm install -g @openai/[email protected]

# or upgrade to latest and re-test
npm install -g @openai/codex@latest
codex --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Test with a trivial edit after changing versions. If a clean version plus bubblewrap clears it, the regression was the cause, not your config.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix 6 (macOS / cross-platform): Widen writable roots
&lt;/h3&gt;

&lt;p&gt;On macOS the sandbox usually works out of the box, so when you do see the prompt it is often a real boundary hit: the command tried to write outside your workspace. Common cases are a build tool writing to a cache directory in your home folder, or a monorepo task touching a sibling package outside the opened directory.&lt;/p&gt;

&lt;p&gt;Add the path to &lt;code&gt;writable_roots&lt;/code&gt; instead of disabling the sandbox:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sandbox_mode = "workspace-write"

[sandbox_workspace_write]
writable_roots = ["/Users/you/.cache/mytool"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;[sandbox_workspace_write]&lt;/code&gt; table also supports &lt;code&gt;exclude_slash_tmp&lt;/code&gt; and &lt;code&gt;exclude_tmpdir_env_var&lt;/code&gt; if you need to tighten &lt;code&gt;/tmp&lt;/code&gt; and &lt;code&gt;$TMPDIR&lt;/code&gt; handling, per the config reference.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Note on --full-auto and --yolo
&lt;/h2&gt;

&lt;p&gt;Two flags come up constantly in forum answers, and one of them is now a trap.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;--full-auto&lt;/code&gt; is a &lt;strong&gt;deprecated compatibility flag&lt;/strong&gt;. The CLI reference describes it as deprecated and says to prefer &lt;code&gt;--sandbox workspace-write&lt;/code&gt;; Codex prints a warning when you use it. If an old blog post tells you to "just run &lt;code&gt;codex --full-auto&lt;/code&gt;," update that habit to &lt;code&gt;--sandbox workspace-write --ask-for-approval on-request&lt;/code&gt;, which is explicit about both controls.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;--dangerously-bypass-approvals-and-sandbox&lt;/code&gt; (alias &lt;code&gt;--yolo&lt;/code&gt;) removes both controls at once. It is the right tool only inside a disposable, network-isolated container or VM, because Codex can then run any command with your full permissions. For unattended runs on a machine you care about, the safer combination is:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;codex --sandbox workspace-write --ask-for-approval never
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;That keeps the filesystem boundary while not pausing for approvals, which is usually what people actually want when they reach for &lt;code&gt;--yolo&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Codex Sandbox Issues in 2026: Real Reports
&lt;/h2&gt;

&lt;p&gt;These are the public issues behind the prompt, with their versions and status. All were CLOSED at the time of writing, which means fixes or workarounds landed, but the version numbers tell you which builds to avoid.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Issue&lt;/th&gt;
&lt;th&gt;Reported version&lt;/th&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;#12888&lt;/td&gt;
&lt;td&gt;multiple&lt;/td&gt;
&lt;td&gt;Agent edits resulting in "retry without sandbox?"&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#16407&lt;/td&gt;
&lt;td&gt;0.118.0 (0.117.0 OK)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;apply_patch&lt;/code&gt; patch-approval loop&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#17134&lt;/td&gt;
&lt;td&gt;n/a (Ubuntu 25.10)&lt;/td&gt;
&lt;td&gt;AppArmor / sandbox on Ubuntu 25.10&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#18079&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;Misleading prompt even when bwrap + writes work&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;#19162&lt;/td&gt;
&lt;td&gt;0.115.0+&lt;/td&gt;
&lt;td&gt;"retry without sandbox" for every command&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The pattern is clear: a cluster of regressions between roughly 0.115 and 0.118 where the &lt;code&gt;apply_patch&lt;/code&gt; path over-triggered the prompt, layered on top of the evergreen Linux cause (bubblewrap not installed). If you read only one, #19162 is the canonical "every command" report, and the maintainer response points straight at the sandboxing prerequisites.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Confirm Your Sandbox Is Healthy
&lt;/h2&gt;

&lt;p&gt;After applying a fix, verify instead of guessing. A quick loop:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;codex --version                         # off the regression range
command -v bwrap                        # Linux: resolves to a path
grep -E 'approval_policy|sandbox_mode' ~/.codex/config.toml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then start Codex and watch for a sandbox startup warning. No warning plus a trivial edit that applies without a prompt means the boundary is working. If you want Codex to surface its own view of the environment, the CLI ships a &lt;code&gt;codex doctor&lt;/code&gt;-style diagnostic in recent builds; run &lt;code&gt;codex --help&lt;/code&gt; to see the subcommands your version exposes, since these change between releases.&lt;/p&gt;

&lt;p&gt;A practical pattern once you have a setup that works: capture it as a named profile so you are not re-typing flags. The config reference says profile files live next to &lt;code&gt;config.toml&lt;/code&gt; as &lt;code&gt;$CODEX_HOME/profile-name.config.toml&lt;/code&gt; and you select one with &lt;code&gt;--profile profile-name&lt;/code&gt;. Keep a strict default in &lt;code&gt;config.toml&lt;/code&gt; and a looser profile file for repos you already trust:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# ~/.codex/trusted.config.toml
approval_policy = "never"
sandbox_mode   = "workspace-write"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Launch it with &lt;code&gt;codex --profile trusted&lt;/code&gt;. This keeps your everyday runs safe while giving you a one-flag escape hatch for trusted repos, without ever reaching for &lt;code&gt;--yolo&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the Sandbox Is the Wrong Layer: Routing Around a Flaky Model Step
&lt;/h2&gt;

&lt;p&gt;Most retry-without-sandbox cases are local: bubblewrap, config, or a version regression. But sometimes the underlying command is fine and the &lt;em&gt;model&lt;/em&gt; is the slow or failing part of the loop, and you want a faster or cheaper backend behind the same Codex workflow.&lt;/p&gt;

&lt;p&gt;Codex CLI talks to any OpenAI-compatible endpoint, which is why it works against &lt;a href="https://ofox.ai/docs" rel="noopener noreferrer"&gt;ofox&lt;/a&gt; with nothing more than an environment variable. You point Codex at the ofox base URL and key, keep your sandbox and approval settings exactly as above, and route to whichever model you want:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export OPENAI_BASE_URL="https://api.ofox.ai/v1"
export OPENAI_API_KEY="your-ofox-key"
# then run Codex normally; sandbox/approval config is unchanged
codex --sandbox workspace-write --ask-for-approval on-request
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This does not change anything about the sandbox prompt; that is a local control. It just means the backend behind the loop is your choice. ofox exposes an OpenAI-compatible API at &lt;code&gt;https://api.ofox.ai/v1&lt;/code&gt; and lists OpenAI models (the GPT-5.4 family and GPT-5.3 Codex) alongside others, so you can keep Codex's local safety controls and swap the model independently. For the full provider setup, the &lt;a href="https://ofox.ai/blog/codex-cli-api-configuration-guide-2026/" rel="noopener noreferrer"&gt;Codex CLI API configuration guide&lt;/a&gt; walks through base URL, key, and model selection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alternatives When You Want a Different Execution Model
&lt;/h2&gt;

&lt;p&gt;If the sandbox model itself is not the fit for your workflow, these are the realistic options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;ofox-backed Codex.&lt;/strong&gt; Keep Codex's sandbox and approval controls, point the OpenAI-compatible base URL at &lt;code&gt;https://api.ofox.ai/v1&lt;/code&gt;, and choose your model. Best when you like the Codex UX but want backend flexibility. Setup is one environment variable.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;--sandbox workspace-write --ask-for-approval never&lt;/code&gt;.&lt;/strong&gt; Same Codex, no prompts, filesystem boundary intact. Best for unattended local runs on a machine you trust.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Disposable container plus &lt;code&gt;--yolo&lt;/code&gt;.&lt;/strong&gt; Full bypass inside an isolated VM or container. Best for throwaway environments where nothing on the host can be harmed.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Other agentic CLIs.&lt;/strong&gt; Claude Code and Cursor have their own permission models. If you fight the Codex sandbox constantly, a different tool's defaults may suit you better. Compare them in &lt;a href="https://ofox.ai/blog/claude-code-vs-codex-cli-vs-cursor-vs-deepseek-tui-2026/" rel="noopener noreferrer"&gt;Claude Code vs Codex CLI vs Cursor&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The honest default for most people is the first or second option: keep the sandbox, fix the root cause, and only loosen controls deliberately.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;The questions above the fold mirror the most common searches around this prompt. The short version is: on Linux, install bubblewrap; everywhere, set &lt;code&gt;approval_policy = "on-request"&lt;/code&gt; and &lt;code&gt;sandbox_mode = "workspace-write"&lt;/code&gt;; if both are correct, suspect a version regression in the 0.115–0.118 range and pin to a known-good build.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/codex-command-failed-retry-without-sandbox-fix-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>codexcli</category>
      <category>troubleshooting</category>
      <category>sandbox</category>
    </item>
    <item>
      <title>Kimi K2.7 Code: Does a 30% Token Cut Lower Your Bill? (2026)</title>
      <dc:creator>Owen</dc:creator>
      <pubDate>Fri, 26 Jun 2026 03:34:10 +0000</pubDate>
      <link>https://dev.to/owen_fox/kimi-k27-code-does-a-30-token-cut-lower-your-bill-2026-4g25</link>
      <guid>https://dev.to/owen_fox/kimi-k27-code-does-a-30-token-cut-lower-your-bill-2026-4g25</guid>
      <description>&lt;h1&gt;
  
  
  Kimi K2.7 Code: Does a 30% Token Cut Lower Your Bill? (2026)
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR.&lt;/strong&gt; Kimi K2.7 Code costs the exact same per token as K2.6 ($0.95/M in, $4.00/M out), and its cache reads are slightly worse ($0.19/M vs $0.16/M). So a lower bill rides entirely on Moonshot's claim that the model burns ~30% fewer thinking tokens. That cut is real money only where reasoning dominates your spend. On a reasoning-heavy job the bill drops about &lt;strong&gt;13%&lt;/strong&gt;, not 30. On an input-heavy job it drops &lt;strong&gt;under 1%&lt;/strong&gt;. Pick K2.7 Code (&lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt;) for text-only reasoning work, stay on K2.6 (&lt;code&gt;moonshotai/kimi-k2.6&lt;/code&gt;) for images or short-output jobs. The benchmarks behind the hype are all vendor-reported and unverified, so the only number you should trust is your own bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR: Which One Should You Pick?
&lt;/h2&gt;

&lt;p&gt;One-line verdict: if your coding traffic is &lt;strong&gt;text-only and reasoning-heavy&lt;/strong&gt;, K2.7 Code shaves real dollars; everywhere else the "30% cut" mostly evaporates by the time it hits your invoice.&lt;/p&gt;

&lt;p&gt;The trap is reading "30% fewer tokens" as "30% cheaper." It isn't. Same per-token price, same context window, marginally worse cache. The savings live in one place only, and you have to qualify for them.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your workload&lt;/th&gt;
&lt;th&gt;Pick&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Text-only, reasoning-heavy coding (long thinking traces)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;K2.7 Code&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Thinking tokens are most of your output spend, so the 30% cut lands hard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agentic loops with long autonomous runs&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;K2.7 Code&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reasoning token reduction compounds across many turns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vision / screenshot / image input&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;K2.6&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;K2.7 Code is text-only; an &lt;code&gt;image_url&lt;/code&gt; block fails on it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input-heavy, short outputs (RAG, summarize, classify)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;K2.6&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Output is a sliver of your bill, so a 30% output cut saves under 1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heavy cache reuse on repeated context&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;K2.6&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;K2.7 Code's cache read is $0.19/M vs K2.6's $0.16/M, so K2.6 is cheaper on cached input&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You haven't measured your own thinking/output ratio yet&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;measure first&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The whole decision turns on that ratio; the A/B loop below gives it to you in 10 lines&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you do nothing else, take that last row seriously. Every dollar figure in this post depends on the share of your output tokens that go to reasoning, and that number is specific to your traffic. Vendor benchmarks won't tell you. Your own logs will.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Specs Comparison
&lt;/h2&gt;

&lt;p&gt;Verified against the ofox model catalog on June 26, 2026. Prices are per million tokens.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Spec&lt;/th&gt;
&lt;th&gt;Kimi K2.7 Code&lt;/th&gt;
&lt;th&gt;Kimi K2.6&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ofox model ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;moonshotai/kimi-k2.6&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context window&lt;/td&gt;
&lt;td&gt;262,144&lt;/td&gt;
&lt;td&gt;262,144&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Max output&lt;/td&gt;
&lt;td&gt;262,144&lt;/td&gt;
&lt;td&gt;262,144&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input $/M&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.95&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.95&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output $/M&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$4.00&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$4.00&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cache read $/M&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.19&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.16&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modality&lt;/td&gt;
&lt;td&gt;text only&lt;/td&gt;
&lt;td&gt;text + image&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Architecture&lt;/td&gt;
&lt;td&gt;1T MoE / 32B active&lt;/td&gt;
&lt;td&gt;MoE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Built-in thinking&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;yes (thinking / non-thinking modes)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Released&lt;/td&gt;
&lt;td&gt;2026-06-12&lt;/td&gt;
&lt;td&gt;2026-04-21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;License&lt;/td&gt;
&lt;td&gt;Modified MIT (open weights)&lt;/td&gt;
&lt;td&gt;open weights&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three facts decide everything below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Per-token price is identical.&lt;/strong&gt; $0.95 in, $4.00 out, on both. If you priced K2.6 already, you've priced K2.7 Code's per-token rate.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Cache reads are worse on K2.7 Code.&lt;/strong&gt; $0.19/M versus $0.16/M. If your pipeline reuses a lot of cached context, K2.7 Code is the more expensive model on that line item. Small, but it cuts against the "cheaper" framing.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;K2.7 Code is text-only.&lt;/strong&gt; The detail people miss: the &lt;em&gt;Code&lt;/em&gt; variant on ofox does not take images. K2.6 does. There's also a &lt;code&gt;moonshotai/kimi-k2.7-code-highspeed&lt;/code&gt; variant at the same price, still text-only.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So price parity plus a worse cache rate means there is exactly one lever that can lower your bill, and it's the thinking-token reduction. The rest of this post is about whether that lever moves your specific invoice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coding Benchmark: What Moonshot Reports (and What's Unverified)
&lt;/h2&gt;

&lt;p&gt;Moonshot's launch numbers for K2.7 Code over K2.6 look strong. Here they are, with the caveat attached to every row.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;K2.6&lt;/th&gt;
&lt;th&gt;K2.7 Code&lt;/th&gt;
&lt;th&gt;Reported gain&lt;/th&gt;
&lt;th&gt;Verified by a third party?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Kimi Code Bench v2&lt;/td&gt;
&lt;td&gt;50.9&lt;/td&gt;
&lt;td&gt;62.0&lt;/td&gt;
&lt;td&gt;+21.8%&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Program Bench&lt;/td&gt;
&lt;td&gt;48.3&lt;/td&gt;
&lt;td&gt;53.6&lt;/td&gt;
&lt;td&gt;+11.0%&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MLS Bench Lite&lt;/td&gt;
&lt;td&gt;26.7&lt;/td&gt;
&lt;td&gt;35.1&lt;/td&gt;
&lt;td&gt;+31.5%&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Read that last column twice. All three are &lt;strong&gt;Moonshot's own proprietary benchmarks&lt;/strong&gt;. There is no independent reproduction, and as of the June 12 release there were no public results on SWE-bench Verified, LiveCodeBench, or GPQA, the benchmarks the rest of the field actually compares against.&lt;/p&gt;

&lt;p&gt;VentureBeat covered the release under the headline that practitioners say the benchmarks don't check out. Researcher Elliot Arledge ran K2.7 Code against K2.6 on KernelBench-Hard, a public GPU-kernel benchmark, and its MoE-kernel score regressed to 0.157 from K2.6's 0.222 on worse tuning. So the picture from outside Moonshot is, at best, mixed, and at worst points the other way on at least one public test.&lt;/p&gt;

&lt;p&gt;There's a structural reason to discount these numbers beyond "they're first-party." A vendor benchmark with a narrow score spread can show a big percentage gain off a small absolute move, and a proprietary harness can be tuned, intentionally or not, to the model that ships with it. The benchmark that would actually settle the question for a routing decision is one with a wide spread across models and a public methodology, where a real capability gap shows up as a large gap in score. K2.7 Code wasn't submitted to that kind of test at launch. So you have three impressive percentages and no way to place them against the models you might route to instead.&lt;/p&gt;

&lt;p&gt;This matters for cost work specifically. If you're switching to K2.7 Code partly because you expect better output quality (fewer retries, fewer correction rounds), the vendor benchmarks are not evidence you can bank on. Fewer retries would be a real cost saving, every failed attempt is tokens you paid for, but you can't claim that saving off numbers nobody outside Moonshot has reproduced. The honest position: treat K2.7 Code as roughly K2.6-class on quality until your own evals say otherwise, and justify the switch on the token math alone, not on the benchmark deltas.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Token Math: Where the 30% Actually Lands
&lt;/h2&gt;

&lt;p&gt;Here's the part the marketing skips. The 30% reduction is on &lt;strong&gt;thinking/reasoning tokens&lt;/strong&gt;, and thinking tokens bill as &lt;strong&gt;output (completion) tokens&lt;/strong&gt;. Your input tokens don't move at all.&lt;/p&gt;

&lt;p&gt;So the structure of a Kimi bill is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bill = input_tokens × $0.95/M  +  output_tokens × $4.00/M

where output_tokens = thinking_tokens + visible_tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;K2.7 Code's claim cuts only the &lt;code&gt;thinking_tokens&lt;/code&gt; piece, by ~30%. Everything else stays put. That gives a clean formula for the real saving:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bill reduction ≈ 0.30 × (thinking spend / total spend)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If thinking is your whole bill, you get close to 30%. If thinking is a sliver, you get a sliver. The variable that decides your outcome is the share of your spend that goes to reasoning, and it ranges from near-total (agentic, multi-step coding) to near-zero (long input, one-line answer).&lt;/p&gt;

&lt;p&gt;Moonshot's own framing makes this concrete with an agentic example: a 12-hour run dropping from ~2M reasoning tokens to ~1.4M, the 30% figure. That's a vendor example, not a measured result on your traffic, but it shows the shape, reasoning-token-dominated work is exactly where the cut is designed to pay off.&lt;/p&gt;

&lt;p&gt;The mistake is generalizing that 12-hour agent run to every job. A summarization call that reads 200K tokens and writes 200 is the opposite profile, and it will see almost nothing. The next section puts dollars on both ends.&lt;/p&gt;

&lt;p&gt;You don't have to guess your thinking-spend share, the API tells you. Every response carries a &lt;code&gt;usage&lt;/code&gt; object with &lt;code&gt;prompt_tokens&lt;/code&gt; and &lt;code&gt;completion_tokens&lt;/code&gt;. Thinking tokens are folded into completion tokens, so the share you care about is &lt;code&gt;completion_tokens × $4.00/M&lt;/code&gt; divided by the whole bill. Log that across a representative week of real traffic and you'll know exactly where on the 1%-to-26% range you sit, before you change a single model string. That measured ratio, not Moonshot's example, is what decides whether the switch pays.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing Math: Real Monthly Bill
&lt;/h2&gt;

&lt;p&gt;Two worked examples, recomputed from the $0.95/$4.00 rates. No cache hits assumed, so this isolates the thinking-token effect. You can rerun the arithmetic; it's deliberately simple.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 1: reasoning-heavy coding job
&lt;/h3&gt;

&lt;p&gt;Profile: 50,000 input tokens, 20,000 output tokens, of which 70% (14,000) is thinking and 30% (6,000) is visible answer. This is the shape of agentic coding, plan, reason, revise.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;K2.6&lt;/th&gt;
&lt;th&gt;K2.7 Code&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Input (50,000 × $0.95/M)&lt;/td&gt;
&lt;td&gt;$0.0475&lt;/td&gt;
&lt;td&gt;$0.0475&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thinking tokens&lt;/td&gt;
&lt;td&gt;14,000&lt;/td&gt;
&lt;td&gt;9,800 (−30%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Visible tokens&lt;/td&gt;
&lt;td&gt;6,000&lt;/td&gt;
&lt;td&gt;6,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output tokens total&lt;/td&gt;
&lt;td&gt;20,000&lt;/td&gt;
&lt;td&gt;15,800&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output cost (× $4.00/M)&lt;/td&gt;
&lt;td&gt;$0.0800&lt;/td&gt;
&lt;td&gt;$0.0632&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Per-job total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.1275&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.1107&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Bill reduction: ($0.1275 − $0.1107) / $0.1275 = &lt;strong&gt;13.2%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Note what happened. Thinking tokens fell 30% (14,000 → 9,800). Total &lt;em&gt;output&lt;/em&gt; tokens fell only 21% (20,000 → 15,800), because the visible answer didn't shrink. And the &lt;em&gt;bill&lt;/em&gt; fell only 13.2%, because input tokens, a third of the cost here, didn't move at all. The "30%" headline became 13% by the time it reached the invoice. That tracks the formula: 0.30 × (thinking spend $0.0560 / total $0.1275) = 13.2%.&lt;/p&gt;

&lt;p&gt;Scale that to a real workload, 1,000 of these jobs a day, 30 days:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Monthly bill&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;K2.6&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$3,825.00&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;K2.7 Code&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$3,321.00&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Saving&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$504.00/mo (−13.2%)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;$504 a month is worth having. Just don't budget for the $1,147 a naive "30% off $3,825" would have promised.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 2: input-heavy job (the cut barely shows)
&lt;/h3&gt;

&lt;p&gt;Profile: 200,000 input tokens, 4,000 output tokens, of which 40% (1,600) is thinking. This is RAG, long-document Q&amp;amp;A, or summarization, big read, short write.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;K2.6&lt;/th&gt;
&lt;th&gt;K2.7 Code&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Input (200,000 × $0.95/M)&lt;/td&gt;
&lt;td&gt;$0.1900&lt;/td&gt;
&lt;td&gt;$0.1900&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output tokens total&lt;/td&gt;
&lt;td&gt;4,000&lt;/td&gt;
&lt;td&gt;3,520 (thinking 1,600 → 1,120)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output cost (× $4.00/M)&lt;/td&gt;
&lt;td&gt;$0.0160&lt;/td&gt;
&lt;td&gt;$0.0141&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Per-job total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.2060&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.2041&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Bill reduction: ($0.2060 − $0.2041) / $0.2060 = &lt;strong&gt;0.93%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Under one percent. The output is a rounding error against the input, so a 30% cut on part of the output is invisible on the invoice. For this load profile, switching to K2.7 Code for cost reasons is pointless, and if you lean on cached input, K2.6's cheaper cache read ($0.16 vs $0.19) makes it the cheaper model outright.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 3: the 12-hour agentic run (the high end)
&lt;/h3&gt;

&lt;p&gt;Moonshot's headline example is a 12-hour agentic run where reasoning tokens drop from ~2M to ~1.4M. That's their number, not mine, but it's worth costing because it's the profile that gets closest to the 30% headline. Assume the run also reads about 500K of input over its life and emits ~200K of visible output (tool calls, file edits, final summaries).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;K2.6&lt;/th&gt;
&lt;th&gt;K2.7 Code&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Input (500,000 × $0.95/M)&lt;/td&gt;
&lt;td&gt;$0.475&lt;/td&gt;
&lt;td&gt;$0.475&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reasoning tokens&lt;/td&gt;
&lt;td&gt;2,000,000&lt;/td&gt;
&lt;td&gt;1,400,000 (−30%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Visible output&lt;/td&gt;
&lt;td&gt;200,000&lt;/td&gt;
&lt;td&gt;200,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output cost (× $4.00/M)&lt;/td&gt;
&lt;td&gt;$8.800&lt;/td&gt;
&lt;td&gt;$6.400&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Per-run total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$9.275&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$6.875&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Bill reduction: ($9.275 − $6.875) / $9.275 = &lt;strong&gt;25.9%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is as good as it gets. Reasoning is the overwhelming share of the bill here, so the cut almost fully passes through. Even so, it's 26%, not 30%, because the input and visible output don't move. Run 20 of these a day for a month and the gap is real:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Monthly bill (20 runs/day × 30 days)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;K2.6&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$5,565&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;K2.7 Code&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$4,125&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Saving&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$1,440/mo (−25.9%)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If your traffic genuinely looks like long autonomous agent runs, K2.7 Code earns its keep. The further your load drifts from that profile toward Example 2, the less it does.&lt;/p&gt;

&lt;p&gt;The three examples bracket the real world. Your bill reduction lands somewhere between &lt;strong&gt;~1% and ~26%&lt;/strong&gt; depending on how reasoning-heavy your traffic is, and a typical mixed coding workload sits around the 13% middle. The closer your output is to all-thinking, the closer you get to the headline; the more your bill is input, the less you save.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Cache Line Item Cuts Against K2.7 Code
&lt;/h2&gt;

&lt;p&gt;One more number the "30% cheaper" story ignores: cache reads. K2.7 Code bills cached input at $0.19/M; K2.6 bills it at $0.16/M. That's a 19% premium on every cached token, on the one model that's supposed to be the cheaper choice.&lt;/p&gt;

&lt;p&gt;It matters whenever you reuse context. Code-review loops over the same repo, multi-turn agent sessions that re-send a system prompt and codebase, RAG over a stable corpus, all of these hit cache on most of their input. Take a 300K-input job at 80% cache hit, output held equal between the two models so we isolate the cache effect:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Line&lt;/th&gt;
&lt;th&gt;K2.6&lt;/th&gt;
&lt;th&gt;K2.7 Code&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Fresh input (60,000 × $0.95/M)&lt;/td&gt;
&lt;td&gt;$0.0570&lt;/td&gt;
&lt;td&gt;$0.0570&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cached input (240,000)&lt;/td&gt;
&lt;td&gt;× $0.16/M = $0.0384&lt;/td&gt;
&lt;td&gt;× $0.19/M = $0.0456&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Input cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.0954&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.1026&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;K2.7 Code costs &lt;strong&gt;$0.0072 more per job&lt;/strong&gt; on input alone. Over 1,000 cache-heavy jobs a day for a month, that's about &lt;strong&gt;$216/mo extra&lt;/strong&gt; that the thinking-token savings have to overcome before you break even. On a job profile that's heavy on cached reads and light on reasoning output (the Example 2 shape with caching added), K2.7 Code can end up the &lt;em&gt;more&lt;/em&gt; expensive model. Worth checking against your own cache-hit rate before you assume "newer = cheaper."&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Pick K2.7 Code
&lt;/h2&gt;

&lt;p&gt;Pick &lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt; when all of these hold:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Your work is &lt;strong&gt;text-only&lt;/strong&gt;. No images in the loop.&lt;/li&gt;
&lt;li&gt;  Your jobs are reasoning-heavy, meaning long thinking traces relative to the visible answer. Agentic coding, multi-step debugging, planning-heavy tasks.&lt;/li&gt;
&lt;li&gt;  You're not leaning hard on &lt;strong&gt;cache reuse&lt;/strong&gt; (if you are, K2.7 Code's $0.19/M cache read costs more than K2.6's $0.16/M).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's the profile where the 30% thinking-token cut translates into a double-digit bill reduction. It's a genuine win for that exact shape of work. Use &lt;code&gt;moonshotai/kimi-k2.7-code-highspeed&lt;/code&gt; if you want more throughput at the same price; the token math is unchanged.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Stick with K2.6
&lt;/h2&gt;

&lt;p&gt;Stay on &lt;code&gt;moonshotai/kimi-k2.6&lt;/code&gt; when any of these hold:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  You need &lt;strong&gt;image input&lt;/strong&gt;. K2.7 Code can't do it, full stop.&lt;/li&gt;
&lt;li&gt;  Your jobs are &lt;strong&gt;input-heavy with short outputs&lt;/strong&gt;. The savings round to nothing (Example 2), and the cheaper cache read makes K2.6 the lower bill.&lt;/li&gt;
&lt;li&gt;  You rely on &lt;strong&gt;non-thinking mode&lt;/strong&gt; for fast, direct answers. If you're not generating thinking tokens, there's nothing for the 30% cut to reduce.&lt;/li&gt;
&lt;li&gt;  You've already validated K2.6 quality in production and have no measured reason to expect K2.7 Code does the job better, since the benchmarks supporting that are unverified.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;K2.6 is the conservative default. It does everything K2.7 Code does except the reasoning-token diet, plus it takes images and has the cheaper cache.&lt;/p&gt;

&lt;h2&gt;
  
  
  When NOT to Use Either (and What to Use Instead)
&lt;/h2&gt;

&lt;p&gt;Both Kimi models sit at $0.95/$4.00. That's mid-pack, not cheap. If your driving constraint is raw cost-per-token and the task doesn't need Kimi-class reasoning, neither is the right answer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  For budget, high-volume batch work (classification, extraction, bulk summarization), route to a cheaper tier. DeepSeek V4 Flash lists at $0.14/$0.28, roughly 6x cheaper blended than Kimi.&lt;/li&gt;
&lt;li&gt;  For hard reasoning where you want a different model family's strengths, GLM-5.2 is the reasoning-tier alternative on ofox.&lt;/li&gt;
&lt;li&gt;  Mixed traffic across all of the above? Don't pick one model. Route each job class to the cheapest model that clears its quality bar; that beats any single-model choice on cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point of K2.7 Code is a narrow efficiency gain on reasoning-heavy text. If that's not your bottleneck, spend your optimization effort on routing, not on this one model swap. A team paying Kimi's $4.00/M output on bulk classification work is leaving far more on the table than the 13% K2.7 Code could ever return, because the right fix there is a cheaper model entirely, not a leaner version of an expensive one. Match the model tier to the job first; optimize within a tier second.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try Both via ofox: A/B in 10 Lines
&lt;/h2&gt;

&lt;p&gt;Every number above depends on your own thinking-to-output ratio, and you can measure it directly. Both models share one OpenAI-compatible endpoint and one ofox key, so an A/B is a loop over two model strings. Run your real prompt through both, log the token counts the API returns, and compute the bill on your traffic instead of trusting an estimate.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python, A/B both models in one loop
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.ofox.ai/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_OFOX_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Refactor this 200-line module into composable functions: &amp;lt;paste code&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;moonshotai/kimi-k2.6&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;moonshotai/kimi-k2.7-code&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;usage&lt;/span&gt;
    &lt;span class="n"&gt;bill&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;prompt_tokens&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.95e-6&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completion_tokens&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;4.00e-6&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: in=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;prompt_tokens&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; out=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completion_tokens&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; bill=$&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bill&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Node, same shape
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;OpenAI&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;openai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;baseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.ofox.ai/v1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OFOX_KEY&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Refactor this 200-line module into composable functions: &amp;lt;paste code&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;moonshotai/kimi-k2.6&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;moonshotai/kimi-k2.7-code&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;u&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bill&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;prompt_tokens&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.95&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completion_tokens&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;4.0&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: in=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;prompt_tokens&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; out=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;u&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completion_tokens&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; bill=$&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;bill&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  One gotcha: K2.7 Code is text-only
&lt;/h3&gt;

&lt;p&gt;K2.6 takes images. K2.7 Code does not. The same &lt;code&gt;image_url&lt;/code&gt; content block that works on &lt;code&gt;moonshotai/kimi-k2.6&lt;/code&gt; will fail on &lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Works on K2.6, fails on K2.7 Code (text-only)
&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;moonshotai/kimi-k2.6&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;            &lt;span class="c1"&gt;# swap to kimi-k2.7-code -&amp;gt; error
&lt;/span&gt;    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s in this screenshot?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;image_url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;image_url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data:image/png;base64,&amp;lt;...&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}},&lt;/span&gt;
        &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a job in your A/B set sends an image, keep it on K2.6 and don't route it to K2.7 Code at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is Kimi K2.7 Code cheaper than K2.6?&lt;/strong&gt; No. Per-token prices are identical ($0.95/M input, $4.00/M output). Cache reads are more expensive on K2.7 Code ($0.19/M vs $0.16/M). The only path to a lower bill is the ~30% thinking-token reduction, and only on reasoning-heavy work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does a 30% token cut mean a 30% lower bill?&lt;/strong&gt; No. The cut applies to thinking tokens, which bill as output; input tokens don't change. Real reduction is about 30% times your thinking-spend share. Reasoning-heavy job: ~13%. Input-heavy job: under 1%.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the ofox model ID for Kimi K2.7 Code?&lt;/strong&gt; &lt;code&gt;moonshotai/kimi-k2.7-code&lt;/code&gt; on the endpoint &lt;code&gt;https://api.ofox.ai/v1&lt;/code&gt;. There's also &lt;code&gt;moonshotai/kimi-k2.7-code-highspeed&lt;/code&gt; at the same price. K2.6 is &lt;code&gt;moonshotai/kimi-k2.6&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Kimi K2.7 Code accept images?&lt;/strong&gt; No. The K2.7 Code variant is text-to-text only; an &lt;code&gt;image_url&lt;/code&gt; block fails. Route vision tasks to &lt;code&gt;moonshotai/kimi-k2.6&lt;/code&gt;, which takes text plus image.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are Kimi K2.7 Code's benchmark numbers verified?&lt;/strong&gt; Not independently. The +21.8% / +11.0% / +31.5% gains are all Moonshot's proprietary benchmarks with no third-party reproduction. VentureBeat reported practitioners say the benchmarks don't check out, and a public KernelBench-Hard run showed a regression. Treat them as vendor-reported.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the context window on Kimi K2.7 Code?&lt;/strong&gt; 262,144 tokens (256K) for both context and max output, same as K2.6. It's a 1T-total / 32B-active MoE with built-in thinking, released June 12 2026 under a Modified MIT open-weight license.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When should I switch from K2.6 to K2.7 Code?&lt;/strong&gt; For text-only, reasoning-heavy coding where thinking dominates output spend. Stay on K2.6 for image input or input-heavy short-output jobs, where the savings round to nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is there a faster version?&lt;/strong&gt; Yes, &lt;code&gt;moonshotai/kimi-k2.7-code-highspeed&lt;/code&gt;, same $0.95/$4.00 pricing, higher throughput. It doesn't change the token math here.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://ofox.ai/blog/kimi-k2-7-code-token-cut-lower-bill-2026/" rel="noopener noreferrer"&gt;ofox.ai/blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>kimi</category>
      <category>llm</category>
      <category>costoptimization</category>
    </item>
  </channel>
</rss>
