The TypeScript SDK now retries when a connection drops mid-response, which can repeat a POST that already succeeded. Set maxRetries to 0 if your calls are not idempotent.
Key takeaways · AI-distilled
Anthropic's TypeScript SDK 1.17.0 now retries when a connection drops while a response body is read, within `maxRetries`. Because the cut response may have been a 2xx, this can repeat a POST that already succeeded; `maxRetries: 0` turns it off.
Connections that drop mid-stream or while iterating Message Batches results now raise `APIConnectionError` with the original error as `cause`, instead of Node's `TypeError: terminated`. Code catching the old error needs updating; streams are not resent.
Output format helpers now keep a `description` written beside a `$ref`, where zod puts `.describe()` on reused schemas. The SchemaA written description of a data format: which fields exist, what kind of value each holds and which are required.Full definition → sent changes, so answers can change, and the PromptInformation or instructions supplied to a model; in a chat, the request you type is often called your prompt.Full definition → cache for that conversation thread is invalidated once.
Because those descriptions are now sent, the APIApplication programming interface: the agreed set of operations, inputs and outputs through which one piece of software uses another.Full definition → can reject an `allOf` whose members give one key the same `$ref` with different descriptions, as zod 4.4 or older `.and()` can produce. Matching descriptions or `.extend()` avoids it.
Terms in this piece · Glossary
Schema — A written description of a data format: which fields exist, what kind of value each holds and which are required.
Prompt — Information or instructions supplied to a model; in a chat, the request you type is often called your prompt.
API — Application programming interface: the agreed set of operations, inputs and outputs through which one piece of software uses another.