Files
skills/public/sdk-upgrade.html
zeekayandHanzo Dev 9e10c1c10e Each llms index points at the other two
hanzoskills.com/llms.txt now opens with the install line, the API
reference index and the company index, so an agent that lands on any
one of the three can find the rest.

robots.txt claimed 537 documents while llms.txt counts 920. The number
is gone from robots.txt; llms.txt derives it.

public/ is regenerated from scripts/site.py, which it had fallen
behind: the copy-prompt menu and agent bar were in the generator and
not in the committed pages. tests/site.mjs passes against the result.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-11 00:27:59 -07:00

321 lines
48 KiB
HTML

<!doctype html>
<html lang="en"><head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>sdk-upgrade</title>
<meta name="color-scheme" content="dark">
<style>
/* Committed to one visual world: a dark instrument panel. No light variant —
the dot field and the hairline rules only read on black, and a naive
inversion would wash both out. Every colour is painted explicitly so the page
never borrows a host background. */
@font-face{font-family:'Zen';src:url('/fonts/Zen-Variable.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:'Zen';src:url('/fonts/Zen-Italic-Variable.woff2') format('woff2');font-weight:100 900;font-style:italic;font-display:swap}
@font-face{font-family:'Zen Mono';src:url('/fonts/ZenMono-Variable.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:'Zen Mono';src:url('/fonts/ZenMono-Italic-Variable.woff2') format('woff2');font-weight:100 900;font-style:italic;font-display:swap}
@font-face{font-family:'Zen Pixel Square';src:url('/fonts/ZenPixel-Square.woff2') format('woff2');font-style:normal;font-display:swap}
:root{
--ink:#f4f4f2; --soft:#9c9c98; --faint:#6a6a66; --ground:#000; --panel:#0a0a0a;
--line:#232323; --line-hi:#3a3a3a; --accent:#f4f4f2;
--font-zen-sans:'Zen',-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
--font-zen-mono:'Zen Mono',ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,monospace;
--font-zen-pixel-square:'Zen Pixel Square',monospace;
--mono:var(--font-zen-mono);
--sans:var(--font-zen-sans);
/* Controls are pills and surfaces are soft, as on hanzo.ai. */
--r:999px; --r-soft:14px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--sans);
font-size:16px;line-height:1.65;-webkit-font-smoothing:antialiased}
.wrap{max-width:60rem;margin:0 auto;padding:0 1.75rem}
/* The dot field. A halftone made of one repeating radial-gradient, faded out
along the diagonal by a mask so it reads as a wave rather than wallpaper. */
/* No overflow clip here: the dot field is inset to the box already, and a clip
would cut off the copy-prompt menu. */
.hero{position:relative;border-bottom:1px solid var(--line)}
.hero::before{content:"";position:absolute;inset:0;
background-image:radial-gradient(var(--line-hi) 1px, transparent 1px);
background-size:7px 7px;
-webkit-mask-image:linear-gradient(115deg,#000 0%,rgba(0,0,0,.55) 38%,transparent 72%);
mask-image:linear-gradient(115deg,#000 0%,rgba(0,0,0,.55) 38%,transparent 72%);
pointer-events:none}
.hero .wrap{position:relative;padding-top:5.5rem;padding-bottom:4rem}
nav{border-bottom:1px solid var(--line)}
nav .in{max-width:60rem;margin:0 auto;padding:1.1rem 1.75rem;display:flex;
justify-content:space-between;align-items:center;gap:1rem}
.brand{font-family:var(--mono);font-size:.85rem;letter-spacing:.14em;
text-transform:uppercase;color:var(--ink);text-decoration:none;
display:inline-flex;align-items:center;gap:.6rem}
.brand i{font-style:normal;color:var(--faint)}
.mark{width:1.15em;height:1.15em;display:block;flex:0 0 auto}
nav a.up{font-family:var(--mono);font-size:.72rem;letter-spacing:.14em;
text-transform:uppercase;color:var(--soft);text-decoration:none}
nav a.up:hover{color:var(--ink)}
h1{font-family:var(--mono);font-size:clamp(2rem,5.4vw,3.4rem);line-height:1.12;
letter-spacing:-.02em;margin:0 0 1.1rem;font-weight:500;text-wrap:balance}
h1 em{font-style:normal;color:var(--faint)}
.lede{color:var(--soft);font-size:1.05rem;max-width:52ch;margin:0 0 2.25rem}
.btns{display:flex;flex-wrap:wrap;gap:.7rem;margin:0 0 .5rem;align-items:center}
.btn{display:inline-flex;align-items:center;gap:.5rem;font-family:var(--mono);
font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;
padding:.8rem 1.4rem;border:1px solid var(--line-hi);border-radius:var(--r);
color:var(--ink);text-decoration:none;background:transparent;cursor:pointer;
line-height:1.2;font-weight:400}
.btn:hover{background:#141414;text-decoration:none;border-color:var(--soft)}
.btn.solid{background:var(--ink);color:#000;border-color:var(--ink)}
.btn.solid:hover{background:#d8d8d4}
.btn .chev{width:.7em;height:.7em;flex:0 0 auto;transition:transform .15s ease}
.btn[aria-expanded="true"] .chev{transform:rotate(180deg)}
/* Copy-prompt selector. Each row copies the prompt for its own target. */
.copy{position:relative;display:inline-flex}
.menu{position:absolute;top:calc(100% + .5rem);left:0;z-index:20;min-width:21rem;
background:var(--panel);border:1px solid var(--line-hi);border-radius:var(--r-soft);
padding:.4rem;display:flex;flex-direction:column;
box-shadow:0 12px 32px rgba(0,0,0,.75)}
.menu[hidden]{display:none}
.mi{display:flex;align-items:center;gap:.7rem;width:100%;text-align:left;
padding:.62rem .8rem;border:0;border-radius:calc(var(--r-soft) - .35rem);
background:transparent;color:var(--ink);font-family:var(--mono);font-size:.76rem;
letter-spacing:.04em;text-decoration:none;cursor:pointer;line-height:1.3;
white-space:nowrap}
.mi:hover,.mi:focus-visible{background:#181818;outline:none}
.mi .mark{width:1.05rem;height:1.05rem;color:var(--soft)}
.mi:hover .mark{color:var(--ink)}
.mi u{margin-left:auto;color:var(--faint);text-decoration:none;font-size:.68rem;
letter-spacing:.1em;text-transform:uppercase}
/* Works-with bar: one scrolling row, name and mark per agent. */
.strip{border-bottom:1px solid var(--line);background:var(--panel)}
.strip .in{max-width:60rem;margin:0 auto;padding:.9rem 1.75rem;display:flex;
align-items:center;gap:1.25rem;font-family:var(--mono);font-size:.72rem;
letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
.strip b{color:var(--soft);font-weight:400;flex:0 0 auto;
border-right:1px solid var(--line);padding-right:1.25rem;align-self:stretch;
display:flex;align-items:center}
.bar{display:flex;align-items:center;gap:.5rem;flex:1 1 auto;min-width:0;
overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;
-webkit-overflow-scrolling:touch;
-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 3rem),transparent);
mask-image:linear-gradient(90deg,#000 calc(100% - 3rem),transparent)}
.bar::-webkit-scrollbar{display:none}
.agent{display:inline-flex;align-items:center;gap:.45rem;flex:0 0 auto;
padding:.4rem .85rem;border:1px solid var(--line);border-radius:var(--r);
color:var(--soft);white-space:nowrap;scroll-snap-align:start;
text-decoration:none;background:var(--ground)}
.agent:hover{color:var(--ink);border-color:var(--line-hi);text-decoration:none}
.agent .mark{width:.95rem;height:.95rem}
h2{font-family:var(--mono);font-size:1.1rem;letter-spacing:-.01em;margin:2.75rem 0 .75rem;font-weight:500}
h3{font-size:1rem;margin:2rem 0 .5rem;font-weight:600}
h4,h5,h6{font-size:.94rem;margin:1.5rem 0 .5rem;font-weight:600}
p{margin:0 0 1rem;max-width:70ch}
ul,ol{margin:0 0 1rem;padding-left:1.35rem;max-width:70ch}
li{margin:.22rem 0}
a{color:var(--ink);text-decoration:underline;text-underline-offset:3px;
text-decoration-color:var(--line-hi)}
a:hover{text-decoration-color:var(--ink)}
a:focus-visible{outline:1px solid var(--ink);outline-offset:3px}
code{font-family:var(--mono);font-size:.85em;background:var(--panel);
border:1px solid var(--line);border-radius:5px;padding:.1em .36em}
pre{background:var(--panel);border:1px solid var(--line);padding:1rem 1.1rem;
border-radius:var(--r-soft);overflow-x:auto;margin:0 0 1.25rem}
pre code{background:none;border:0;padding:0;font-size:.82rem;line-height:1.7}
blockquote{margin:0 0 1rem;padding-left:1rem;border-left:1px solid var(--line-hi);color:var(--soft)}
hr{border:0;border-top:1px solid var(--line);margin:2.5rem 0}
table{border-collapse:collapse;width:100%;margin:0 0 1.25rem;font-size:.92rem;
display:block;overflow-x:auto}
th,td{border:1px solid var(--line);padding:.5rem .7rem;text-align:left}
.curl{display:block;background:var(--panel);border:1px solid var(--line);
border-radius:var(--r-soft);padding:.95rem 1.1rem;font-family:var(--mono);
font-size:.8rem;color:var(--soft);overflow-x:auto;margin:0 0 2.5rem;
white-space:pre;line-height:1.9}
.curl b{color:var(--ink);font-weight:400}
.curl i{font-style:normal;color:var(--faint)}
/* index */
#q{width:100%;padding:.85rem 1.2rem;font-family:var(--mono);font-size:.85rem;color:var(--ink);
background:var(--panel);border:1px solid var(--line);border-radius:var(--r);margin:0 0 .6rem}
#q::placeholder{color:var(--faint);text-transform:uppercase;letter-spacing:.1em;font-size:.72rem}
#q:focus{outline:none;border-color:var(--soft)}
#count{color:var(--faint);font-family:var(--mono);font-size:.72rem;letter-spacing:.1em;
text-transform:uppercase;margin:0 0 2rem}
.cat{margin:2.5rem 0 .5rem;font-family:var(--mono);font-size:.7rem;letter-spacing:.16em;
text-transform:uppercase;color:var(--faint);border-bottom:1px solid var(--line);
padding-bottom:.45rem}
.row{display:block;padding:.6rem .9rem;margin:0 -.9rem;border-bottom:1px solid var(--line);
border-radius:var(--r-soft);text-decoration:none}
.row:hover{background:#0a0a0a}
.nm{font-family:var(--mono);font-size:.84rem;color:var(--ink);display:block}
.ds{color:var(--soft);font-size:.9rem;display:block;margin-top:.12rem}
footer{margin-top:4rem;padding:2rem 0 4rem;border-top:1px solid var(--line);
color:var(--faint);font-size:.85rem}
footer a{color:var(--soft)}
.fmap{display:grid;gap:1.75rem;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));
margin:0 0 2rem;font-size:.85rem}
.fmap b{display:block;font-family:var(--mono);font-size:.68rem;letter-spacing:.16em;
text-transform:uppercase;color:var(--faint);font-weight:400;margin:0 0 .6rem;
border-bottom:1px solid var(--line);padding-bottom:.4rem}
.fmap a{display:inline-block;color:var(--ink);text-decoration:none;margin:.3rem .35rem 0 0}
.fmap a:hover{text-decoration:underline}
.fmap div{color:var(--faint);line-height:1.5}
.fend{border-top:1px solid var(--line);padding-top:1.25rem;font-size:.82rem}
@media (max-width:640px){
.hero .wrap{padding-top:3.25rem;padding-bottom:2.75rem}
.btns{gap:.5rem}
.btn{padding:.75rem 1.15rem;font-size:.68rem}
.copy,.copy .btn{width:100%;justify-content:center}
.menu{left:0;right:0;min-width:0}
.strip .in{flex-direction:column;align-items:flex-start;gap:.6rem;padding:.9rem 1.75rem}
.strip b{border-right:0;padding-right:0}
.bar{width:100%}
}
</style>
<link rel="alternate" type="text/markdown" href="/sdk-upgrade.md">
<link rel="icon" href="/favicon.svg">
<link rel="canonical" href="https://hanzoskills.com/sdk-upgrade">
</head>
<!-- Reading this with a machine? Every page here is also plain markdown.
This one: https://hanzoskills.com/sdk-upgrade.md
Index: https://hanzoskills.com/llms.txt
Corpus: https://hanzoskills.com/all.md
Append .md to any path for the markdown twin. -->
<body>
<nav><div class="in">
<a class="brand" href="/"><svg class="mark" viewBox="0 0 67 67" fill="currentColor" aria-hidden="true"><path d="M22.21 67V44.6369H0V67H22.21Z"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z"/><path d="M22.21 0H0V22.3184H22.21V0Z"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z"/></svg> HANZO<i>SKILLS</i></a>
<a class="up" href="/">All skills</a>
</div></nav>
<div class="wrap">
<h1>sdk-upgrade</h1><p class="lede">anthropic 1.x is deliberately a small step from the last 0.x release: no method was restructured and no new pattern is required.</p><h1>Upgrading the <code>anthropic</code> Python SDK: 0.x → 1.x</h1>
<blockquote><p><strong>If you arrived via <code>/claude-api upgrade</code>:</strong> this is the right file. Execute the steps below in order — do not summarize them back to the user. Start with Step 0 before touching any file.</p></blockquote>
<p><code>anthropic</code> 1.x is deliberately a small step from the last 0.x release: no method was restructured and no new pattern is required. Long-deprecated surface was removed, the HTTP layer moved from <code>httpx</code> to its maintained fork <code>httpx2</code>, and the minimum Python version is now 3.10. Almost every required edit is mechanical, and a type checker flags nearly all of them once 1.x is installed — which makes <code>pyright</code> / <code>mypy</code> output a good cross-check for the inventory below.</p>
<p>The SDK repository&#x27;s <code>MIGRATION.md</code> is the authoritative change list — WebFetch it (URL in <code>shared/live-sources.md</code> → SDK major-version upgrade guides) when you can, and if it disagrees with this file, follow <code>MIGRATION.md</code> and say so in your report. The other Python files in this skill may still show 0.x-era details; for a project on 1.x, this file takes precedence.</p>
<hr>
<h2>Step 0: Confirm scope, current version, and target</h2>
<p><strong>Scope — ask before editing unless it is already unambiguous.</strong> Same rule as model migration: if the request does not name an exact file, a specific directory, or an explicit file list, ask one question offering (1) the whole working directory, (2) a specific subdirectory, (3) specific files — and wait. <code>upgrade</code>, <code>upgrade python</code>, &quot;move my project to anthropic v1&quot; are all scope-ambiguous. A trailing path in the subcommand (<code>upgrade python src/</code>) is a scope. Dependency manifests and lockfiles at the project root (<code>pyproject.toml</code>, <code>requirements*.txt</code>, <code>setup.py</code>/<code>setup.cfg</code>, <code>Pipfile</code>, <code>uv.lock</code>, <code>poetry.lock</code>) count as in scope whenever any code under them is — say so when you confirm the scope.</p>
<p><strong>Current version.</strong> Read the declared requirement (<code>anthropic...</code> in the manifests above) and, if a project environment is available, the installed one (<code>python -c &quot;import anthropic; print(anthropic.__version__)&quot;</code>). If the project is already on 1.x, skip the dependency bump and treat this as a call-site cleanup. If nothing in scope declares the dependency (a bare scripts directory, or <code>anthropic</code> arrives transitively), don&#x27;t invent a manifest — upgrade the code and put the install command in the report.</p>
<p><strong>Target version.</strong> Before writing any pin, confirm a 1.x release is actually published: <code>pip index versions anthropic</code> (or <code>curl -s https://pypi.org/pypi/anthropic/json</code> and read <code>info.version</code>). Use the newest 1.x you find. If no 1.x release exists yet, stop and tell the user — do not write an uninstallable requirement. If you cannot check (no network), proceed with <code>&gt;=1,&lt;2</code> and list the unverified pin in your report.</p>
<p>If the scope is under git, check <code>git status</code> before editing — unexpected modifications mean a concurrent process; stop and investigate before proceeding.</p>
<h2>Step 1: Inventory the call sites</h2>
<p>Search the scope for each signal below (<code>rg -n -F</code> for the literal strings; exclude virtualenvs, <code>.git</code>, build output and vendored code) and keep the hit list — it is your checklist and, re-run at the end, your verification.</p>
<p>| Signal | What it finds | Section | |---|---|---| | <code>requires-python</code>, <code>python_requires</code>, <code>python-version</code>, <code>py39</code>, <code>3.9</code> in manifests, CI config, <code>tox.ini</code>, <code>noxfile.py</code>, <code>.python-version</code>, <code>Dockerfile</code> | a Python 3.9 floor | Step 2 | | <code>anthropic</code> entries in manifests / lockfiles; <code>httpx-aiohttp</code>, <code>httpx_aiohttp</code> | the pins to change | Step 2 | | <code>import httpx</code>, <code>from httpx</code> | modules that may hand <code>httpx</code> objects to the SDK | Step 3 | | <code>respx</code>, <code>pytest_httpx</code> / <code>httpx_mock</code>, <code>vcr</code>, <code>MockTransport</code>; <code>HTTPXClientInstrumentor</code> / <code>opentelemetry.instrumentation.httpx</code>, <code>HttpxIntegration</code> (Sentry) | HTTP mocking and tracing / APM instrumentation that patch <code>httpx</code> and silently stop seeing SDK traffic | Step 3 | | <code>with_raw_response</code> | raw-response call sites | Step 4 | | <code>LegacyAPIResponse</code>, <code>_legacy_response</code> | annotations / imports of the removed class | Step 4 | | <code>completions.create</code>, <code>HUMAN_PROMPT</code>, <code>AI_PROMPT</code>, <code>max_tokens_to_sample</code> | the removed Text Completions API | Step 5 | | <code>temperature</code>, <code>top_p</code>, <code>top_k</code> (keyword arguments and quoted dict keys) | removed sampling parameters — only hits that feed Anthropic SDK calls count | Step 6 | | <code>output_format</code> | raw <code>output_format={...}</code> dicts vs the unchanged <code>output_format=Model</code> helper argument | Step 6 | | <code>BetaBase64PDFBlockParam</code>, <code>READ_MAX_BYTES</code>, <code>ProxiesTypes</code> / <code>Transport</code> imported from <code>anthropic</code>, <code>AsyncTransport</code> / <code>ProxiesDict</code> imported from <code>anthropic._types</code> | renamed / removed exports | Step 7 | | <code>.parse(</code> calls that pass <code>stream=</code> | <code>messages.parse(stream=...)</code> | Step 8 | | <code>compaction_control</code> | client-side tool-runner compaction | Step 8 | | <code>body=</code> on <code>client.get</code> / <code>post</code> / <code>put</code> / <code>patch</code> / <code>delete</code> calls whose value is <code>bytes</code> (<code>b&quot;...&quot;</code>, <code>.encode()</code>, a bytes variable) | raw bytes passed as <code>body=</code> | Step 8 | | <code>isinstance(</code> checks against <code>Stream</code> / <code>AsyncStream</code> | checks aimed at message streams | Step 8 | | <code>default_headers</code>, <code>extra_headers</code>, <code>ANTHROPIC_CUSTOM_HEADERS</code> | header maps to check for duplicate casings / <code>bytes</code> values | Step 9 | | <code>AnthropicBedrock(</code>, <code>AsyncAnthropicBedrock(</code> | Bedrock clients that may rely on the old region fallback | Step 10 |</p>
<p>Classify each hit before editing: <strong>SDK call site</strong> (edit), <strong>unrelated use of the same name</strong> (leave — e.g. <code>httpx</code> calls to other services, <code>urllib.parse</code>, a pydantic <code>.parse_obj</code>, a <code>temperature</code> variable for a thermostat), <strong>test</strong> (edit, and keep the test meaningful), <strong>docs / README snippet or notebook inside the scope</strong> (edit — for <code>.ipynb</code>, the greps match inside the JSON cell sources; edit the source strings, <code>%pip install</code> lines included, and keep the JSON valid). Never touch installed packages or vendored third-party code.</p>
<h2>Step 2: Environment — Python ≥ 3.10 and the dependency pins</h2>
<ul><li><strong>[DECIDE] Python floor.</strong> 1.x requires Python 3.10+. If the project still declares or tests 3.9 (<code>requires-python = &quot;&gt;=3.9&quot;</code>, trove classifiers, a <code>3.9</code> CI matrix entry, tox/nox envs, a <code>python:3.9</code> base image), that is the user&#x27;s decision, not a silent edit: propose the floor bump and the CI-matrix change as their own hunk and call it out in the report. On 3.9, <code>pip</code> simply keeps resolving the last 0.x release, so nothing breaks until they move.</li><li><strong>[BREAKS] The <code>anthropic</code> requirement.</strong> Rewrite it in the file&#x27;s existing style — <code>anthropic&gt;=1,&lt;2</code> for a range, <code>anthropic~=1.0</code> / Poetry <code>^1.0</code> for compatible-release styles, <code>anthropic==&lt;latest 1.x from Step 0&gt;</code> where the project pins exactly. Extras (<code>anthropic[bedrock]</code>, <code>[vertex]</code>, <code>[aiohttp]</code>) are unchanged. Regenerate the lockfile with the project&#x27;s own tool (<code>uv lock</code>, <code>poetry lock</code>, <code>pip-compile</code>, <code>pipenv lock</code>) if you can run it; otherwise give the user the exact command.</li><li><strong><code>httpx-aiohttp</code>.</strong> If it is pinned only so <code>DefaultAioHttpClient()</code> works, remove it — the aiohttp transport now ships inside the SDK and the <code>aiohttp</code> extra installs only <code>aiohttp</code>.</li><li><strong><code>httpx2</code> / <code>httpx</code>.</strong> After Step 3, if any project module imports <code>httpx2</code> directly, add <code>httpx2</code> to the declared dependencies (it arrives transitively with <code>anthropic</code>, but direct imports should be declared). <code>httpx2</code> has its own version line starting at 2.0 — write <code>httpx2&gt;=2.0</code> (or match what <code>anthropic</code> resolved: <code>pip index versions httpx2</code>), never a specifier copied from the old <code>httpx</code> pin such as <code>&gt;=0.27</code>. Keep <code>httpx</code> declared only if the project still uses it for something other than the SDK.</li></ul>
<p>Pydantic v1 and v2 both remain supported; nothing else about the environment changes.</p>
<h2>Step 3: <code>httpx</code> → <code>httpx2</code>, only where objects cross the SDK boundary</h2>
<p><code>httpx2</code> is the API-compatible, maintained fork of <code>httpx</code> (same classes, same behaviour). The change only matters for <code>httpx</code> objects handed <strong>to</strong> the SDK or received <strong>from</strong> it; plain values (<code>timeout=30.0</code>, <code>max_retries=3</code>) need nothing.</p>
<ul><li><strong>[BREAKS] Objects passed in.</strong> <code>httpx.Timeout</code>, <code>httpx.Limits</code>, transports (<code>httpx.HTTPTransport(...)</code>, <code>AsyncHTTPTransport</code>, <code>MockTransport</code>), and whole clients (<code>httpx.Client</code> / <code>AsyncClient</code> as <code>http_client=</code>) must come from <code>httpx2</code>. An old-<code>httpx</code> client passed as <code>http_client=</code> raises <code>TypeError</code> at construction. This includes the project&#x27;s own middleware, not just the outermost object handed to <code>Anthropic(...)</code>: a <code>class TracingTransport(httpx.BaseTransport)</code> subclass, the inner <code>httpx.HTTPTransport()</code> a wrapper delegates to, an <code>httpx.Auth</code> flow, and the annotations on <code>event_hooks</code> callables all re-base onto <code>httpx2</code> — a wrapper left delegating to an old-<code>httpx</code> transport hands the SDK <code>httpx.Response</code> objects. If the module uses <code>httpx</code> only for the SDK, alias the import (<code>import httpx2 as httpx</code>) and nothing else changes; if it also talks to other services with <code>httpx</code>, import both and switch only the SDK-bound objects to <code>httpx2</code>. Prefer the SDK&#x27;s own re-exports where they let you drop the import entirely: <code>anthropic.Timeout</code>, <code>anthropic.DefaultHttpxClient</code>, <code>anthropic.DefaultAsyncHttpxClient</code>, <code>anthropic.DefaultAioHttpClient</code> (all already <code>httpx2</code>-based, all unchanged).</li></ul>
<p> ```python # Before import httpx from anthropic import Anthropic, DefaultHttpxClient</p>
<p> client = Anthropic( timeout=httpx.Timeout(60.0, connect=5.0), http_client=DefaultHttpxClient(proxy=&quot;http://proxy.example&quot;, transport=httpx.HTTPTransport(retries=1)), )</p>
<p> # After import httpx2 as httpx from anthropic import Anthropic, DefaultHttpxClient</p>
<p> client = Anthropic( timeout=httpx.Timeout(60.0, connect=5.0), http_client=DefaultHttpxClient(proxy=&quot;http://proxy.example&quot;, transport=httpx.HTTPTransport(retries=1)), ) ```</p>
<ul><li><strong>[DECIDE] Or alias process-wide, for applications.</strong> <code>httpx2.alias_httpx()</code> makes <code>import httpx</code> / <code>import httpcore</code> resolve to <code>httpx2</code> / <code>httpcore2</code> for the whole process, so nothing else needs editing. Reach for it instead of the import edits when the scope is an <strong>application</strong> that shares clients, transports or exception types between the SDK and other <code>httpx</code> code, or that relies on tooling which patches <code>httpx</code> itself (tracing / APM instrumentation, HTTP mocking — see <strong>Instrumentation and tests</strong> below). Two hard rules: it must run before anything imports <code>httpx</code> or <code>httpcore</code> (otherwise it raises <code>RuntimeError</code>; calling it twice is a no-op), so it goes at the very top of the entry point; and it is for applications only — never add it to a <strong>library&#x27;s</strong> import path on behalf of that library&#x27;s users (edit the imports there instead). Say which you chose and why in the report.</li></ul>
<p> ```python # the very first lines of the application&#x27;s entry point import httpx2</p>
<p> httpx2.alias_httpx()</p>
<p> import httpx # now the httpx2 module: httpx.Client is httpx2.Client ```</p>
<ul><li><strong>[BREAKS] Objects coming out.</strong> <code>APIStatusError.response</code>, <code>APIConnectionError.request</code>, <code>.http_response</code> / <code>.headers</code> / <code>.url</code> on raw and streaming responses, the <code>request</code> / <code>response</code> arguments your <code>http_client</code> event hooks receive, and <code>cast_to=httpx.Response</code> on the low-level <code>client.get/post/...</code> methods are now <code>httpx2</code> types with identical attributes. Only <code>isinstance</code> checks and annotations naming <code>httpx.Response</code> / <code>httpx.Request</code> / <code>httpx.Headers</code> / <code>httpx.URL</code> change (<code>httpx2.Response</code>, …).</li><li><strong>Removed re-exports.</strong> <code>anthropic.Transport</code> and <code>anthropic.ProxiesTypes</code> (and <code>AsyncTransport</code> / <code>ProxiesDict</code> from <code>anthropic._types</code>) are gone; use <code>httpx2.BaseTransport</code>, <code>httpx2.AsyncBaseTransport</code>, <code>httpx2.Proxy</code> (or a proxy URL string).</li><li><strong>Instrumentation and tests.</strong> Libraries that observe or stub HTTP by patching <code>httpx</code> — OpenTelemetry&#x27;s <code>HTTPXClientInstrumentor</code>, Sentry&#x27;s <code>httpx</code> integration, <code>respx</code>, <code>pytest-httpx</code>, <code>vcrpy</code> — keep importing fine but silently stop seeing the SDK&#x27;s requests, so nothing fails loudly. The fix is the same <code>httpx2.alias_httpx()</code> call — not swapping in some <code>*-httpx2</code> instrumentation package (verify any such name is a real, populated release before depending on it) — made before any of them (or <code>httpx</code>) is imported: at the top of the application entry point for instrumentation, and under pytest as an early plugin so it runs before <code>respx</code> / <code>pytest-httpx</code> and the test modules load:</li></ul>
<p> ```python # tests/_alias_httpx.py import httpx2</p>
<p> httpx2.alias_httpx() # <code>import httpx</code> / <code>import httpcore</code> now resolve to httpx2 / httpcore2 ```</p>
<p> ``<code>toml # pyproject.toml [tool.pytest.ini_options] addopts = &quot;-p tests._alias_httpx&quot; pythonpath = [&quot;.&quot;] </code>``</p>
<p> Merge into an existing <code>addopts</code> rather than replacing it (<code>pytest.ini</code> / <code>setup.cfg</code> / <code>tox.ini</code> equivalents work the same way). Transport-level fakes (<code>httpx2.Client(transport=httpx2.MockTransport(handler))</code>, a handler typed <code>httpx2.Request -&gt; httpx2.Response</code>) only need the import swap.</p>
<h2>Step 4: <code>.with_raw_response</code> returns <code>APIResponse</code> / <code>AsyncAPIResponse</code></h2>
<p><code>.with_raw_response</code> used to return <code>LegacyAPIResponse</code> on both clients; it now returns the same classes <code>.with_streaming_response</code> already used. Two consequences:</p>
<ul><li><strong>[BREAKS] On async clients, reading the body is awaited</strong> — <code>parse()</code>, <code>json()</code>, <code>text()</code>, <code>read()</code> are coroutines. Decide sync vs async from the client the accessor hangs off (<code>AsyncAnthropic</code> and the other <code>Async*</code> platform clients) or an <code>await</code> on the <code>.with_raw_response...(...)</code> call itself — not from the enclosing function alone.</li><li><strong>[BREAKS] <code>.text</code> and <code>.content</code> are methods now, on the sync client too:</strong> <code>.text</code> → <code>.text()</code>, <code>.content</code> → <code>.read()</code>. The new classes also expose <code>json()</code> and the <code>iter_bytes()</code> / <code>iter_text()</code> / <code>iter_lines()</code> iterators directly; 0.x code reached those through <code>r.http_response</code>, which still works and need not be rewritten.</li></ul>
<p>| 0.x (<code>LegacyAPIResponse</code>) | 1.x sync (<code>APIResponse</code>) | 1.x async (<code>AsyncAPIResponse</code>) | |---|---|---| | <code>r.parse()</code> | <code>r.parse()</code> | <code>await r.parse()</code> | | <code>r.text</code> | <code>r.text()</code> | <code>await r.text()</code> | | <code>r.content</code> | <code>r.read()</code> | <code>await r.read()</code> | | — (only <code>r.http_response.json()</code>) | <code>r.json()</code> | <code>await r.json()</code> | | — (only <code>r.http_response.iter_bytes()</code> …) | <code>r.iter_bytes()</code> / <code>.iter_text()</code> / <code>.iter_lines()</code> | <code>async for chunk in r.iter_bytes():</code> … | | <code>.headers</code>, <code>.status_code</code>, <code>.url</code>, <code>.request_id</code>, <code>.retries_taken</code>, <code>.http_response</code>, <code>.elapsed</code> | unchanged | unchanged (plain attributes — never awaited) |</p>
<pre><code class="lang-python"># Before (async client)
raw = await client.messages.with_raw_response.create(...)
print(raw.headers[&quot;request-id&quot;], raw.text)
message = raw.parse()
# After
raw = await client.messages.with_raw_response.create(...)
print(raw.headers[&quot;request-id&quot;], await raw.text())
message = await raw.parse()</code></pre>
<p>Anchor every edit on a value that demonstrably comes from a <code>.with_raw_response.</code> call (follow it through variables, return values and fixtures); do not touch <code>.parse()</code> / <code>.text</code> on unrelated objects, and do not double-await. Annotations and imports of <code>anthropic._legacy_response.LegacyAPIResponse</code> become <code>anthropic.APIResponse</code> / <code>anthropic.AsyncAPIResponse</code>. <code>.with_streaming_response</code> code is unchanged.</p>
<h2>Step 5: Text Completions → Messages (the one non-mechanical change)</h2>
<p><strong>[BREAKS]</strong> <code>client.completions.create()</code> (<code>/v1/complete</code>), the <code>Completion</code> types, and the <code>anthropic.HUMAN_PROMPT</code> / <code>anthropic.AI_PROMPT</code> constants are removed (also from <code>AnthropicBedrock</code>). Port each call to <code>client.messages.create()</code>:</p>
<ul><li>the <code>f&quot;{HUMAN_PROMPT} …{AI_PROMPT}&quot;</code> prompt string becomes <code>messages=[{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;…&quot;}]</code>; text that preceded the first <code>HUMAN_PROMPT</code> as instructions becomes <code>system=</code>; alternating <code>HUMAN_PROMPT</code>/<code>AI_PROMPT</code> turns become alternating <code>user</code>/<code>assistant</code> messages;</li><li><code>max_tokens_to_sample=</code> → <code>max_tokens=</code>; <code>stop_sequences=</code> carries over; drop <code>temperature</code>/<code>top_p</code>/<code>top_k</code> (Step 6);</li><li><code>completion.completion</code> → the text blocks of <code>message.content</code> (<code>&quot;&quot;.join(b.text for b in message.content if b.type == &quot;text&quot;)</code>); <code>stop_reason</code> values carry over (<code>&quot;stop_sequence&quot;</code>, <code>&quot;max_tokens&quot;</code>), with <code>&quot;end_turn&quot;</code> as the new normal-completion value;</li><li><code>stream=True</code> completions → <code>client.messages.stream(...)</code> and its <code>text_stream</code>.</li></ul>
<pre><code class="lang-python"># Before
from anthropic import AI_PROMPT, HUMAN_PROMPT
completion = client.completions.create(
model=&quot;claude-2.1&quot;,
max_tokens_to_sample=256,
prompt=f&quot;{HUMAN_PROMPT} Why is the sky blue?{AI_PROMPT}&quot;,
)
print(completion.completion)
# After
message = client.messages.create(
model=&quot;claude-opus-5&quot;,
max_tokens=256,
messages=[{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;Why is the sky blue?&quot;}],
)
print(&quot;&quot;.join(block.text for block in message.content if block.type == &quot;text&quot;))</code></pre>
<p><strong>[DECIDE] The model.</strong> Code still on Text Completions usually pins a retired model (<code>claude-2.x</code>, <code>claude-instant-*</code>), which 404s regardless of SDK version. Keep a model that is still served; otherwise switch to <code>claude-opus-5</code> so the code runs, say so prominently in the report, and point the user at <code>/claude-api migrate</code> for validating prompts against the new model — a completions-era prompt is exactly what <code>shared/prompt-audit.md</code> exists for.</p>
<h2>Step 6: Removed request parameters</h2>
<ul><li><strong>[BREAKS] <code>temperature</code>, <code>top_p</code>, <code>top_k</code></strong> are no longer accepted by <code>messages.create()</code> / <code>.stream()</code> / <code>.parse()</code>, their <code>beta.messages</code> counterparts, or <code>beta.messages.tool_runner()</code> (passing them is a <code>TypeError</code>), and are gone from the per-request <code>params</code> TypedDict of <code>messages.batches.create()</code> (a type checker flags the key; at runtime the SDK still forwards it). Delete them — they are gone from the 1.x signatures, not from the API, and whether a model still honours them is a model question (<code>shared/model-migration.md</code>): Opus 4.7 and later return a 400 for any request that carries one (the default value included), Claude Sonnet 5 rejects non-default values, and every still-served model before those accepts them — the Claude 4.6 / 4.5 line (Opus 4.6, Sonnet 4.6, Opus 4.5, Sonnet 4.5, Haiku 4.5) and the deprecated-but-still-served Claude 4 models (<code>shared/models.md</code> → Deprecated Models). So <strong>[DECIDE]</strong> when the call pins one of those accepting models and visibly depends on the setting (a documented determinism requirement, an A/B on temperature), move it into <code>extra_body</code> instead of deleting it — <code>extra_body={&quot;temperature&quot;: 0.2}</code> is merged into the request JSON as-is — and for a <code>messages.batches.create()</code> request leave the key in that request&#x27;s <code>params</code> dict (it is forwarded, see above). A call that pins a retired model (<code>shared/models.md</code> → Retired Models) is the <code>migrate</code> flow&#x27;s problem first: it needs a replacement model, and the replacement decides whether the setting survives. Say which calls kept a setting this way in the report. When a test existed only to assert that these parameters pass through, keep it meaningful by asserting on parameters that still exist (<code>stop_sequences</code>, <code>metadata</code>, <code>service_tier</code>, <code>max_tokens</code>) rather than deleting it.</li></ul>
<p> ```python # Before client.messages.create(..., model=&quot;claude-sonnet-4-6&quot;, temperature=0.2)</p>
<p> # After (only when the pinned model accepts it and the code depends on it) client.messages.create(..., model=&quot;claude-sonnet-4-6&quot;, extra_body={&quot;temperature&quot;: 0.2}) ```</p>
<ul><li><strong>[BREAKS] <code>output_format={...}</code> as a raw dict/TypedDict</strong> — on <code>beta.messages.create()</code>, <code>beta.messages.count_tokens()</code> and batch params (where the parameter is gone) and on the <code>messages.stream()</code> / <code>messages.count_tokens()</code> / <code>beta.messages.stream()</code> helpers (which used to accept a dict as well and now raise <code>TypeError</code> for one) → <code>output_config={&quot;format&quot;: {...}}</code> (merge into an existing <code>output_config</code> if one is already passed, e.g. alongside <code>effort</code>). <strong>Leave <code>output_format=SomeModel</code> alone</strong> when the value is a <em>type</em> (a Pydantic model / class passed to the <code>parse()</code>, <code>stream()</code> or <code>tool_runner()</code> helpers, or to the non-beta <code>messages.count_tokens()</code>) — that is the one form the helpers still take (<code>beta.messages.count_tokens()</code> only ever took the dict form, and has no <code>output_format</code> at all now). Tell them apart by the value: dict literal / <code>{&quot;type&quot;: &quot;json_schema&quot;, ...}</code> → migrate; a class name → keep.</li></ul>
<p> ```python # Before client.beta.messages.create(..., temperature=0.2, output_format={&quot;type&quot;: &quot;json_schema&quot;, &quot;schema&quot;: Order.model_json_schema()})</p>
<p> # After client.beta.messages.create(..., output_config={&quot;format&quot;: {&quot;type&quot;: &quot;json_schema&quot;, &quot;schema&quot;: Order.model_json_schema()}}) # or, usually better: client.beta.messages.parse(..., output_format=Order) ```</p>
<h2>Step 7: Renamed and removed names (pure renames)</h2>
<p><strong>[BREAKS]</strong> Replace imports and every reference; the replacement types are identical.</p>
<p>| Removed | Replacement | |---|---| | <code>anthropic.types.beta.BetaBase64PDFBlockParam</code> | <code>anthropic.types.beta.BetaRequestDocumentBlockParam</code> | | <code>anthropic.Transport</code> / <code>anthropic.ProxiesTypes</code> (and <code>anthropic._types.AsyncTransport</code> / <code>ProxiesDict</code>) | <code>httpx2.BaseTransport</code> / <code>httpx2.Proxy</code> (<code>httpx2.AsyncBaseTransport</code>) | | <code>anthropic.HUMAN_PROMPT</code> / <code>anthropic.AI_PROMPT</code> | none — Step 5 | | <code>anthropic.lib.tools.agent_toolset.READ_MAX_BYTES</code> | <code>anthropic.lib.tools.agent_toolset.DEFAULT_MAX_FILE_BYTES</code> |</p>
<h2>Step 8: Removed helper arguments and behaviour</h2>
<ul><li><strong>[BREAKS] <code>messages.parse(..., stream=True)</code></strong> (and <code>beta.messages.parse</code>): the argument is gone (it never streamed). Use the streaming helper, which supports the same structured-output types:</li></ul>
<p> ```python # Before result = client.messages.parse(..., output_format=Order, stream=True)</p>
<p> # After with client.messages.stream(..., output_format=Order) as stream: order = stream.get_final_message().parsed_output ```</p>
<p> A <code>parse(..., stream=False)</code> just loses the argument.</p>
<ul><li><strong>[BREAKS] <code>tool_runner(compaction_control=...)</code></strong> — client-side compaction is removed in favour of server-side compaction. Carry the old <code>context_token_threshold</code> over as the trigger value (the API minimum is 50,000; raise smaller values to that and mention it):</li></ul>
<p> ```python # Before runner = client.beta.messages.tool_runner(..., compaction_control={&quot;enabled&quot;: True, &quot;context_token_threshold&quot;: 100_000})</p>
<p> # After runner = client.beta.messages.tool_runner( ..., betas=[&quot;compact-2026-01-12&quot;], context_management={&quot;edits&quot;: [{&quot;type&quot;: &quot;compact_20260112&quot;, &quot;trigger&quot;: {&quot;type&quot;: &quot;input_tokens&quot;, &quot;value&quot;: 100_000}}]}, ) ```</p>
<p> If the loop around the runner rebuilds <code>messages</code> itself, make sure it appends the full <code>message.content</code> (compaction blocks included) — see the Compaction section of <code>python/claude-api/README.md</code>.</p>
<ul><li><strong>[BREAKS] Raw <code>bytes</code> as <code>body=</code></strong> on <code>client.get/post/put/patch/delete</code>: <code>body=</code> is always JSON-serialised now; raw payloads (and iterators, for streaming uploads) go through <code>content=</code>:</li></ul>
<p> ```python # Before client.post(&quot;/v1/example&quot;, body=b&quot;raw payload&quot;, cast_to=httpx.Response)</p>
<p> # After client.post(&quot;/v1/example&quot;, content=b&quot;raw payload&quot;, cast_to=httpx2.Response) ```</p>
<ul><li><strong>[BREAKS] <code>isinstance(x, anthropic.Stream)</code> / <code>AsyncStream</code> meant to match <code>client.messages.stream()</code> objects</strong> now returns <code>False</code> (the compatibility shim and its <code>DeprecationWarning</code> are gone). Check for <code>anthropic.lib.streaming.MessageStream</code> / <code>AsyncMessageStream</code> instead; keep <code>Stream</code> only where the value really is a raw <code>create(stream=True)</code> stream.</li></ul>
<h2>Step 9: Header names are matched case-insensitively</h2>
<p>Usually nothing to edit. The SDK now merges <code>default_headers</code>, <code>extra_headers</code>, <code>with_options(default_headers=...)</code> and <code>ANTHROPIC_CUSTOM_HEADERS</code> case-insensitively: a later entry replaces an earlier header of the same name whatever its casing (including headers the SDK sets itself), and <code>omit</code> removes one the same way. Scan the Step 1 hits for two things and fix only those: <strong>[DECIDE]</strong> the same header name spelled with two casings where the code relied on both lines being sent (send one comma-joined value instead), and <strong>[BREAKS]</strong> <code>bytes</code> header values, which now raise — <code>.decode()</code> them.</p>
<h2>Step 10: Bedrock — a region is required</h2>
<p><strong>[DECIDE]</strong> <code>AnthropicBedrock()</code> / <code>AsyncAnthropicBedrock()</code> used to warn and fall back to <code>us-east-1</code> when no region was configured; they now raise <code>ValueError</code> at construction. Resolution order: <code>aws_region=</code> → <code>AWS_REGION</code> / <code>AWS_DEFAULT_REGION</code> → the region configured for the boto3 session / <code>aws_profile</code> (the profile is now honoured for region lookup). For each construction without <code>aws_region=</code>, check whether the deployment provides a region (env files, Dockerfiles, deployment manifests, AWS profile config in the repo). If it demonstrably does, nothing to do; if you cannot tell, do <strong>not</strong> invent a region — list the call site in the report as needing <code>aws_region=</code> or <code>AWS_REGION</code>, and only hardcode <code>&quot;us-east-1&quot;</code> if the user confirms that the old implicit default is what they were actually using.</p>
<p>Streaming from Bedrock also changes: event types the SDK does not know are now skipped instead of yielded — the only known case is the <code>amazon-bedrock-invocationMetrics</code> frame. Code that filtered those frames out can be deleted; code that <em>consumed</em> invocation metrics loses them on 1.x — <strong>[DECIDE]</strong> list it in the report (the SDK asks such users to open an issue).</p>
<h2>Step 11: Verify</h2>
<ol><li>Re-run the Step 1 greps over the scope. Every remaining hit needs a reason (unrelated <code>httpx</code> use, <code>Raw*</code> names, helper <code>output_format=Model</code>, …) — put the reasons in the report.</li><li><code>python -m compileall -q &lt;scope&gt;</code> must pass. If the project has a type checker configured, run it — nearly every missed call site is a type error on 1.x. Run the test suite if it is runnable without credentials.</li><li>If 1.x is installed in the environment: <code>python -c &quot;import anthropic, httpx2; print(anthropic.__version__)&quot;</code>.</li></ol>
<h2>Step 12: Report</h2>
<p>Lead with the outcome, then:</p>
<ul><li>what changed, grouped by the steps above, with file counts and the notable files;</li><li><strong>decisions the user owns</strong> — Python floor / CI matrix (Step 2), import edits vs <code>alias_httpx()</code> (Step 3), sampling-parameter reliance (Step 6), the model chosen for ported completions calls (Step 5), duplicate-casing headers (Step 9), Bedrock regions and invocation metrics (Step 10);</li><li>if you introduced <code>httpx2</code> anywhere, one provenance line, because reviewers and supply-chain scanners flag unfamiliar package names as possible typosquats: it is the SDK&#x27;s own HTTP dependency, the maintained fork of <code>httpx</code> by its original author, published by Pydantic (<code>github.com/pydantic/httpx2</code>), version line 2.x;</li><li>what you could not verify (offline PyPI check, no type checker, tests not runnable, pre-commit hooks that need the new packages installed) and the exact commands to finish: the install / lock command and, if relevant, <code>pip uninstall httpx-aiohttp</code>.</li></ul>
<h2>Checklist</h2>
<ul><li>[ ] <strong>[BREAKS]</strong> <code>anthropic</code> requirement moved to 1.x in the project&#x27;s pin style; lockfile regenerated or command given</li><li>[ ] <strong>[DECIDE]</strong> Python ≥ 3.10 floor and CI matrix proposed as a separate hunk</li><li>[ ] <strong>[BREAKS]</strong> <code>httpx</code> objects passed to / received from the SDK (custom transports, auth flows and event hooks included) come from <code>httpx2</code> — or <strong>[DECIDE]</strong> <code>httpx2.alias_httpx()</code> at the top of an application entry point; <code>httpx</code>-patching instrumentation / mocking (<code>respx</code>, <code>pytest-httpx</code>, <code>vcrpy</code>, OpenTelemetry, Sentry) covered by the alias; <code>httpx-aiohttp</code> dropped; <code>httpx2&gt;=2.0</code> declared if imported</li><li>[ ] <strong>[BREAKS]</strong> async <code>.with_raw_response</code>: <code>await</code> on <code>parse()/json()/text()/read()</code>; <code>.text</code> → <code>.text()</code>, <code>.content</code> → <code>.read()</code> everywhere; <code>LegacyAPIResponse</code> annotations replaced</li><li>[ ] <strong>[BREAKS]</strong> <code>completions.create</code> / <code>HUMAN_PROMPT</code> / <code>AI_PROMPT</code> ported to Messages; <strong>[DECIDE]</strong> model choice surfaced</li><li>[ ] <strong>[BREAKS]</strong> <code>temperature</code> / <code>top_p</code> / <code>top_k</code> removed from SDK calls — or, <strong>[DECIDE]</strong>, moved to <code>extra_body</code> only where the call pins an older model <em>and</em> visibly depends on the setting; raw <code>output_format={...}</code> → <code>output_config={&quot;format&quot;: ...}</code> everywhere (helpers included); helper <code>output_format=Model</code> untouched</li><li>[ ] <strong>[BREAKS]</strong> <code>BetaBase64PDFBlockParam</code> → <code>BetaRequestDocumentBlockParam</code>; <code>Transport</code>/<code>AsyncTransport</code>/<code>ProxiesTypes</code> → <code>httpx2</code> names; <code>READ_MAX_BYTES</code> → <code>DEFAULT_MAX_FILE_BYTES</code></li><li>[ ] <strong>[BREAKS]</strong> <code>parse(stream=)</code> → <code>messages.stream()</code>; <code>compaction_control</code> → server-side compaction; <code>body=bytes</code> → <code>content=</code>; <code>Stream</code> isinstance checks retargeted</li><li>[ ] <strong>[DECIDE]</strong> duplicate-casing headers joined; <strong>[BREAKS]</strong> <code>bytes</code> header values decoded</li><li>[ ] <strong>[DECIDE]</strong> Bedrock constructions without a discoverable region listed, not guessed; invocation-metrics consumers flagged</li><li>[ ] Step 11 verification run and Step 12 report written</li></ul>
<footer>
<div class="fmap">
<div><b>Build</b>
<a href="https://hanzo.app">hanzo.app</a> app builder
<a href="https://hanzo.codes">hanzo.codes</a> code with an agent
<a href="https://hanzoskills.com">hanzoskills.com</a> what an agent reads</div>
<div><b>Run</b>
<a href="https://console.hanzo.ai">console.hanzo.ai</a> cloud console
<a href="https://api.hanzo.ai">api.hanzo.ai</a> the API</div>
<div><b>Account</b>
<a href="https://hanzo.id">hanzo.id</a> sign in
<a href="https://pay.hanzo.ai">pay.hanzo.ai</a> top up
<a href="https://billing.hanzo.ai">billing.hanzo.ai</a> invoices and usage</div>
<div><b>Company</b>
<a href="https://hanzo.ai">hanzo.ai</a> canonical
<a href="https://hanzo.ventures">hanzo.ventures</a> ventures</div>
</div>
<div class="fend"><a href="/sdk-upgrade.md">This page as plain text</a> · <a href="/llms.txt">Index for agents</a></div>
</footer>
</div></body></html>