Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@anthropic-ai/sdk

anthropics5.1mMIT0.52.0TypeScript support: included

The official TypeScript library for the Anthropic API

readme

Anthropic TypeScript API Library

NPM version npm bundle size

This library provides convenient access to the Anthropic REST API from server-side TypeScript or JavaScript.

The REST API documentation can be found on docs.anthropic.com. The full API of this library can be found in api.md.

Installation

npm install @anthropic-ai/sdk

Usage

The full API of this library can be found in api.md.

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  apiKey: process.env['ANTHROPIC_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const message = await client.messages.create({
    max_tokens: 1024,
    messages: [{ role: 'user', content: 'Hello, Claude' }],
    model: 'claude-3-5-sonnet-latest',
  });

  console.log(message.content);
}

main();

Streaming responses

We provide support for streaming responses using Server Sent Events (SSE).

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic();

const stream = await client.messages.create({
  max_tokens: 1024,
  messages: [{ role: 'user', content: 'Hello, Claude' }],
  model: 'claude-3-5-sonnet-latest',
  stream: true,
});
for await (const messageStreamEvent of stream) {
  console.log(messageStreamEvent.type);
}

If you need to cancel a stream, you can break from the loop or call stream.controller.abort().

Request & Response types

This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  apiKey: process.env['ANTHROPIC_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const params: Anthropic.MessageCreateParams = {
    max_tokens: 1024,
    messages: [{ role: 'user', content: 'Hello, Claude' }],
    model: 'claude-3-5-sonnet-latest',
  };
  const message: Anthropic.Message = await client.messages.create(params);
}

main();

Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.

Counting Tokens

You can see the exact usage for a given request through the usage response property, e.g.

const message = await client.messages.create(...)
console.log(message.usage)
// { input_tokens: 25, output_tokens: 13 }

Streaming Helpers

This library provides several conveniences for streaming messages, for example:

import Anthropic from '@anthropic-ai/sdk';

const anthropic = new Anthropic();

async function main() {
  const stream = anthropic.messages
    .stream({
      model: 'claude-3-5-sonnet-latest',
      max_tokens: 1024,
      messages: [
        {
          role: 'user',
          content: 'Say hello there!',
        },
      ],
    })
    .on('text', (text) => {
      console.log(text);
    });

  const message = await stream.finalMessage();
  console.log(message);
}

main();

Streaming with client.messages.stream(...) exposes various helpers for your convenience including event handlers and accumulation.

Alternatively, you can use client.messages.create({ ..., stream: true }) which only returns an async iterable of the events in the stream and thus uses less memory (it does not build up a final message object for you).

Message Batches

This SDK provides beta support for the Message Batches API under the client.beta.messages.batches namespace.

Creating a batch

Message Batches takes an array of requests, where each object has a custom_id identifier, and the exact same request params as the standard Messages API:

await anthropic.beta.messages.batches.create({
  requests: [
    {
      custom_id: 'my-first-request',
      params: {
        model: 'claude-3-5-sonnet-latest',
        max_tokens: 1024,
        messages: [{ role: 'user', content: 'Hello, world' }],
      },
    },
    {
      custom_id: 'my-second-request',
      params: {
        model: 'claude-3-5-sonnet-latest',
        max_tokens: 1024,
        messages: [{ role: 'user', content: 'Hi again, friend' }],
      },
    },
  ],
});

Getting results from a batch

Once a Message Batch has been processed, indicated by .processing_status === 'ended', you can access the results with .batches.results()

const results = await anthropic.beta.messages.batches.results(batch_id);
for await (const entry of results) {
  if (entry.result.type === 'succeeded') {
    console.log(entry.result.message.content);
  }
}

Tool use

This SDK provides support for tool use, aka function calling. More details can be found in the documentation.

AWS Bedrock

We provide support for the Anthropic Bedrock API through a separate package.

File uploads

Request parameters that correspond to file uploads can be passed in many different forms:

  • File (or an object with the same structure)
  • a fetch Response (or an object with the same structure)
  • an fs.ReadStream
  • the return value of our toFile helper

Note that we recommend you set the content-type explicitly as the files API will not infer it for you:

import fs from 'fs';
import Anthropic, { toFile } from '@anthropic-ai/sdk';

const client = new Anthropic();

// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
await client.beta.files.upload({
  file: await toFile(fs.createReadStream('/path/to/file'), undefined, { type: 'application/json' }),
  betas: ['files-api-2025-04-14'],
});

// Or if you have the web `File` API you can pass a `File` instance:
await client.beta.files.upload({
  file: new File(['my bytes'], 'file.txt', { type: 'text/plain' }),
  betas: ['files-api-2025-04-14'],
});
// You can also pass a `fetch` `Response`:
await client.beta.files.upload({
  file: await fetch('https://somesite/file'),
  betas: ['files-api-2025-04-14'],
});

// Or a `Buffer` / `Uint8Array`
await client.beta.files.upload({
  file: await toFile(Buffer.from('my bytes'), 'file', { type: 'text/plain' }),
  betas: ['files-api-2025-04-14'],
});
await client.beta.files.upload({
  file: await toFile(new Uint8Array([0, 1, 2]), 'file', { type: 'text/plain' }),
  betas: ['files-api-2025-04-14'],
});

Handling errors

When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of APIError will be thrown:

async function main() {
  const message = await client.messages
    .create({
      max_tokens: 1024,
      messages: [{ role: 'user', content: 'Hello, Claude' }],
      model: 'claude-3-5-sonnet-latest',
    })
    .catch(async (err) => {
      if (err instanceof Anthropic.APIError) {
        console.log(err.status); // 400
        console.log(err.name); // BadRequestError
        console.log(err.headers); // {server: 'nginx', ...}
      } else {
        throw err;
      }
    });
}

main();

Error codes are as follows:

Status Code Error Type
400 BadRequestError
401 AuthenticationError
403 PermissionDeniedError
404 NotFoundError
422 UnprocessableEntityError
429 RateLimitError
>=500 InternalServerError
N/A APIConnectionError

Request IDs

For more information on debugging requests, see these docs

All object responses in the SDK provide a _request_id property which is added from the request-id response header so that you can quickly log failing requests and report them back to Anthropic.

const message = await client.messages.create({
  max_tokens: 1024,
  messages: [{ role: 'user', content: 'Hello, Claude' }],
  model: 'claude-3-5-sonnet-latest',
});
console.log(message._request_id); // req_018EeWyXxfu5pfWkrYcMdjWG

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors will all be retried by default.

You can use the maxRetries option to configure or disable this:

// Configure the default for all requests:
const client = new Anthropic({
  maxRetries: 0, // default is 2
});

// Or, configure per-request:
await client.messages.create({ max_tokens: 1024, messages: [{ role: 'user', content: 'Hello, Claude' }], model: 'claude-3-5-sonnet-latest' }, {
  maxRetries: 5,
});

Timeouts

By default requests time out after 10 minutes. However if you have specified a large max_tokens value and are not streaming, the default timeout will be calculated dynamically using the formula:

const minimum = 10 * 60;
const calculated = (60 * 60 * maxTokens) / 128_000;
return calculated < minimum ? minimum * 1000 : calculated * 1000;

which will result in a timeout up to 60 minutes, scaled by the max_tokens parameter, unless overriden at the request or client level.

You can configure this with a timeout option:

// Configure the default for all requests:
const client = new Anthropic({
  timeout: 20 * 1000, // 20 seconds (default is 10 minutes)
});

// Override per-request:
await client.messages.create({ max_tokens: 1024, messages: [{ role: 'user', content: 'Hello, Claude' }], model: 'claude-3-5-sonnet-latest' }, {
  timeout: 5 * 1000,
});

On timeout, an APIConnectionTimeoutError is thrown.

Note that requests which time out will be retried twice by default.

Long Requests

[!IMPORTANT] We highly encourage you use the streaming Messages API for longer running requests.

We do not recommend setting a large max_tokens values without using streaming. Some networks may drop idle connections after a certain period of time, which can cause the request to fail or timeout without receiving a response from Anthropic.

This SDK will also throw an error if a non-streaming request is expected to be above roughly 10 minutes long. Passing stream: true or overriding the timeout option at the client or request level disables this error.

An expected request latency longer than the timeout for a non-streaming request will result in the client terminating the connection and retrying without receiving a response.

When supported by the fetch implementation, we set a TCP socket keep-alive option in order to reduce the impact of idle connection timeouts on some networks. This can be overriden by configuring a custom proxy.

Auto-pagination

List methods in the Anthropic API are paginated. You can use the for await … of syntax to iterate through items across all pages:

async function fetchAllBetaMessagesBatches(params) {
  const allBetaMessagesBatches = [];
  // Automatically fetches more pages as needed.
  for await (const betaMessageBatch of client.beta.messages.batches.list({ limit: 20 })) {
    allBetaMessagesBatches.push(betaMessageBatch);
  }
  return allBetaMessagesBatches;
}

Alternatively, you can request a single page at a time:

let page = await client.beta.messages.batches.list({ limit: 20 });
for (const betaMessageBatch of page.data) {
  console.log(betaMessageBatch);
}

// Convenience methods are provided for manually paginating:
while (page.hasNextPage()) {
  page = await page.getNextPage();
  // ...
}

Default Headers

We automatically send the anthropic-version header set to 2023-06-01.

If you need to, you can override it by setting default headers on a per-request basis.

Be aware that doing so may result in incorrect types and other unexpected or undefined behavior in the SDK.

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic();

const message = await client.messages.create(
  {
    max_tokens: 1024,
    messages: [{ role: 'user', content: 'Hello, Claude' }],
    model: 'claude-3-5-sonnet-latest',
  },
  { headers: { 'anthropic-version': 'My-Custom-Value' } },
);

Advanced Usage

Accessing raw Response data (e.g., headers)

The "raw" Response returned by fetch() can be accessed through the .asResponse() method on the APIPromise type that all methods return. This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.

You can also use the .withResponse() method to get the raw Response along with the parsed data. Unlike .asResponse() this method consumes the body, returning once it is parsed.

const client = new Anthropic();

const response = await client.messages
  .create({
    max_tokens: 1024,
    messages: [{ role: 'user', content: 'Hello, Claude' }],
    model: 'claude-3-5-sonnet-latest',
  })
  .asResponse();
console.log(response.headers.get('X-My-Header'));
console.log(response.statusText); // access the underlying Response object

const { data: message, response: raw } = await client.messages
  .create({
    max_tokens: 1024,
    messages: [{ role: 'user', content: 'Hello, Claude' }],
    model: 'claude-3-5-sonnet-latest',
  })
  .withResponse();
console.log(raw.headers.get('X-My-Header'));
console.log(message.content);

Logging

[!IMPORTANT] All log messages are intended for debugging only. The format and content of log messages may change between releases.

Log levels

The log level can be configured in two ways:

  1. Via the ANTHROPIC_LOG environment variable
  2. Using the logLevel client option (overrides the environment variable if set)
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  logLevel: 'debug', // Show all log messages
});

Available log levels, from most to least verbose:

  • 'debug' - Show debug messages, info, warnings, and errors
  • 'info' - Show info messages, warnings, and errors
  • 'warn' - Show warnings and errors (default)
  • 'error' - Show only errors
  • 'off' - Disable all logging

At the 'debug' level, all HTTP requests and responses are logged, including headers and bodies. Some authentication-related headers are redacted, but sensitive data in request and response bodies may still be visible.

Custom logger

By default, this library logs to globalThis.console. You can also provide a custom logger. Most logging libraries are supported, including pino, winston, bunyan, consola, signale, and @std/log. If your logger doesn't work, please open an issue.

When providing a custom logger, the logLevel option still controls which messages are emitted, messages below the configured level will not be sent to your logger.

import Anthropic from '@anthropic-ai/sdk';
import pino from 'pino';

const logger = pino();

const client = new Anthropic({
  logger: logger.child({ name: 'Anthropic' }),
  logLevel: 'debug', // Send all messages to pino, allowing it to filter
});

Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.get, client.post, and other HTTP verbs. Options on the client, such as retries, will be respected when making these requests.

await client.post('/some/path', {
  body: { some_prop: 'foo' },
  query: { some_query_arg: 'bar' },
});

Undocumented request params

To make requests using undocumented parameters, you may use // @ts-expect-error on the undocumented parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you send will be sent as-is.

client.foo.create({
  foo: 'my_param',
  bar: 12,
  // @ts-expect-error baz is not yet public
  baz: 'undocumented option',
});

For requests with the GET verb, any extra params will be in the query, all other requests will send the extra param in the body.

If you want to explicitly send an extra argument, you can do so with the query, body, and headers request options.

Undocumented response properties

To access undocumented response properties, you may access the response object with // @ts-expect-error on the response object, or cast the response object to the requisite type. Like the request params, we do not validate or strip extra properties from the response from the API.

Customizing the fetch client

By default, this library expects a global fetch function is defined.

If you want to use a different fetch function, you can either polyfill the global:

import fetch from 'my-fetch';

globalThis.fetch = fetch;

Or pass it to the client:

import Anthropic from '@anthropic-ai/sdk';
import fetch from 'my-fetch';

const client = new Anthropic({ fetch });

Fetch options

If you want to set custom fetch options without overriding the fetch function, you can provide a fetchOptions object when instantiating the client or making a request. (Request-specific options override client options.)

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  fetchOptions: {
    // `RequestInit` options
  },
});

Configuring proxies

To modify proxy behavior, you can provide custom fetchOptions that add runtime-specific proxy options to requests:

Node [docs]

import Anthropic from '@anthropic-ai/sdk';
import * as undici from 'undici';

const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
const client = new Anthropic({
  fetchOptions: {
    dispatcher: proxyAgent,
  },
});

Bun [docs]

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  fetchOptions: {
    proxy: 'http://localhost:8888',
  },
});

Deno [docs]

import Anthropic from 'npm:@anthropic-ai/sdk';

const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
const client = new Anthropic({
  fetchOptions: {
    client: httpClient,
  },
});

Frequently Asked Questions

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes that only affect static types, without breaking runtime behavior.
  2. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  3. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Requirements

TypeScript >= 4.9 is supported.

The following runtimes are supported:

  • Node.js 20 LTS or later (non-EOL) versions.
  • Deno v1.28.0 or higher.
  • Bun 1.0 or later.
  • Cloudflare Workers.
  • Vercel Edge Runtime.
  • Jest 28 or greater with the "node" environment ("jsdom" is not supported at this time).
  • Nitro v2.6 or greater.
  • Web browsers: disabled by default to avoid exposing your secret API credentials (see our help center for best practices). Enable browser support by explicitly setting dangerouslyAllowBrowser to true.
<summary>More explanation</summary>

Why is this dangerous?

Enabling the dangerouslyAllowBrowser option can be dangerous because it exposes your secret API credentials in the client-side code. Web browsers are inherently less secure than server environments, any user with access to the browser can potentially inspect, extract, and misuse these credentials. This could lead to unauthorized access using your credentials and potentially compromise sensitive data or functionality.

When might this not be dangerous?

In certain scenarios where enabling browser support might not pose significant risks:
  • Internal Tools: If the application is used solely within a controlled internal environment where the users are trusted, the risk of credential exposure can be mitigated.
  • Development or debugging purpose: Enabling this feature temporarily might be acceptable, provided the credentials are short-lived, aren't also used in production environments, or are frequently rotated.

Note that React Native is not supported at this time.

If you are interested in other runtime environments, please open or upvote an issue on GitHub.

Contributing

See the contributing documentation.

changelog

Changelog

0.52.0 (2025-05-22)

Full Changelog: sdk-v0.51.0...sdk-v0.52.0

Features

  • api: add claude 4 models, files API, code execution tool, MCP connector and more (769f9da)

Chores

  • internal: codegen related update (2ed236d)
  • internal: version bump (8ebaf61)

0.51.0 (2025-05-15)

Full Changelog: sdk-v0.50.4...sdk-v0.51.0

Features

  • bedrock: support skipAuth on Bedrock client to bypass local auth requirements (b661c5f)

Bug Fixes

  • bedrock: support model names with slashes (cb5fa8a)

Chores

  • package: remove engines (f0378ec)

0.50.4 (2025-05-12)

Full Changelog: sdk-v0.50.3...sdk-v0.50.4

Bug Fixes

  • stream: correctly accumulate usage (c55b4f0)

0.50.3 (2025-05-09)

Full Changelog: sdk-v0.50.2...sdk-v0.50.3

Bug Fixes

  • client: always overwrite when merging headers (657912a)
  • client: always overwrite when merging headers (bf70c9f)

0.50.2 (2025-05-09)

Full Changelog: sdk-v0.50.1...sdk-v0.50.2

Bug Fixes

  • ci: bump publish workflow to node 20 (306a081)

Chores

Documentation

0.50.1 (2025-05-09)

Full Changelog: sdk-v0.50.0...sdk-v0.50.1

0.50.0 (2025-05-09)

Full Changelog: sdk-v0.41.0...sdk-v0.50.0

Features

  • api: adds web search capabilities to the Claude API (b36623f)
  • api: manual updates (80d5daa)
  • api: manual updates (3124e2b)
  • client: add withOptions helper (caab783)

Bug Fixes

  • bedrock,vertex: update to new SDK version (cb620bb)
  • client: send all configured auth headers (3961628)
  • internal: fix file uploads in node 18 jest (1071b34)
  • mcp: remove unused tools.ts (4c4d763)
  • messages: updates for server tools (c2709b2)
  • update old links (f33a68a)
  • vertex,bedrock: correct build script (df895a7)

Chores

  • bedrock: add skipAuth option to allow users to let authorization be handled elsewhere (ee58772)
  • bedrock: bump @aws-sdk dependencies (ff925db)
  • bedrock: bump @aws-sdk/credential-providers (9f611d6)
  • ci: add timeout thresholds for CI jobs (385f900)
  • ci: only use depot for staging repos (1f05880)
  • ci: run on more branches and use depot runners (7176150)
  • client: drop support for EOL node versions (ffbb2da)
  • client: minor internal fixes (595678f)
  • internal: codegen related update (a6ae129)
  • internal: fix format script (9ce30ba)
  • internal: formatting fixes (7bd4594)
  • internal: improve index signature formatting (7dc3e19)
  • internal: improve node 18 shims (c6780dd)
  • internal: reduce CI branch coverage (464431d)
  • internal: refactor utils (b3dee57)
  • internal: share typescript helpers (74187db)
  • internal: upload builds and expand CI branch coverage (bbda5d3)
  • perf: faster base64 decoding (975795a)
  • tests: improve enum examples (66cf6d4)

Documentation

0.41.0 (2025-05-07)

Full Changelog: sdk-v0.40.1...sdk-v0.41.0

Features

  • api: adds web search capabilities to the Claude API (fae7e52)

Chores

  • ci: bump node version for release workflows (3502747)

Documentation

0.40.1 (2025-04-28)

Full Changelog: sdk-v0.40.0...sdk-v0.40.1

Chores

0.40.0 (2025-04-25)

Full Changelog: sdk-v0.39.0...sdk-v0.40.0

Features

  • add SKIP_BREW env var to ./scripts/bootstrap (#710) (1b8376a)
  • api: extract ContentBlockDelta events into their own schemas (#732) (fd0ec83)
  • api: manual updates (39b64c9)
  • api: manual updates (771e05b)
  • api: manual updates (ca6dbd6)
  • api: manual updates (14df8cc)
  • client: accept RFC6838 JSON content types (#713) (fc32787)
  • mcp: allow opt-in mcp resources and endpoints (#720) (9f3a54e)

Bug Fixes

Chores

  • add hash of OpenAPI spec/config inputs to .stats.yml (#725) (271be7d)
  • bedrock: bump @aws-sdk/credential-providers (a4d88d7)
  • ci: add timeout thresholds for CI jobs (1080c70)
  • ci: only use depot for staging repos (359dafa)
  • ci: run on more branches and use depot runners (3331315)
  • client: minor internal fixes (fcf3e35)
  • internal: add aliases for Record and Array (#735) (e0a4bec)
  • internal: add back release workflow (68d54e5)
  • internal: codegen related update (#737) (2a368bb)
  • internal: fix lint (2cf3641)
  • internal: import ordering changes (#708) (a5680e1)
  • internal: improve index signature formatting (#739) (627c5fa)
  • internal: reduce CI branch coverage (6ed0bd6)
  • internal: remove CI condition (#730) (cc31518)
  • internal: remove extra empty newlines (#716) (4d3c024)
  • internal: update config (#728) (ababd80)
  • internal: upload builds and expand CI branch coverage (#744) (0b7432a)
  • tests: improve enum examples (#743) (c1c93a7)

0.39.0 (2025-02-28)

Full Changelog: sdk-v0.38.0...sdk-v0.39.0

Features

  • api: add support for disabling tool calls (#701) (1602b51)

Documentation

  • update URLs from stainlessapi.com to stainless.com (#699) (05e33b7)

0.38.0 (2025-02-27)

Full Changelog: sdk-v0.37.0...sdk-v0.38.0

Features

  • api: add URL source blocks for images and PDFs (#698) (16e7336)

Chores

Documentation

0.37.0 (2025-02-24)

Full Changelog: sdk-v0.36.3...sdk-v0.37.0

Features

  • api: add claude-3.7 + support for thinking (ffab311)
  • client: send X-Stainless-Timeout header (#679) (1172430)
  • pagination: avoid fetching when has_more: false (#680) (d4df248)

Bug Fixes

  • client: fix export map for index exports (#684) (56d9c7a)
  • correctly decode multi-byte characters over multiple chunks (#681) (e369e3d)
  • optimize sse chunk reading off-by-one error (#686) (53669af)

Chores

  • api: update openapi spec url (#678) (84401b1)
  • internal: add missing return type annotation (#685) (a8862b9)
  • internal: fix devcontainers setup (#689) (8665946)
  • internal: reorder model constants (#676) (52a2a11)
  • internal: update models used in tests (52a2a11)

0.36.3 (2025-01-27)

Full Changelog: sdk-v0.36.2...sdk-v0.36.3

Bug Fixes

Chores

0.36.2 (2025-01-23)

Full Changelog: sdk-v0.36.1...sdk-v0.36.2

Bug Fixes

  • bedrock: update streaming util import (255c059)

0.36.1 (2025-01-23)

Full Changelog: sdk-v0.36.0...sdk-v0.36.1

Chores

0.36.0 (2025-01-23)

Full Changelog: sdk-v0.35.0...sdk-v0.36.0

Features

Chores

  • bedrock: bump dependency on @anthropic-ai/sdk (8745ca2)
  • internal: fix import (628b55e)
  • internal: minor restructuring (#664) (57aefa7)
  • vertex: bump dependency on @anthropic-ai/sdk (a1c7fcd)

0.35.0 (2025-01-21)

Full Changelog: sdk-v0.34.0...sdk-v0.35.0

Features

Bug Fixes

  • docs: correct results return type (#657) (4e6d031)
  • examples: add token counting example (2498e2e)
  • send correct Accept header for certain endpoints (#651) (17ffaeb)
  • vertex: add beta.messages.countTokens method (51d3f23)

Chores

Documentation

0.34.0 (2024-12-20)

Full Changelog: sdk-v0.33.1...sdk-v0.34.0

Features

  • api: add message batch delete endpoint (#640) (54f7e1f)

Bug Fixes

Chores

Documentation

0.33.1 (2024-12-17)

Full Changelog: sdk-v0.33.0...sdk-v0.33.1

Bug Fixes

  • vertex: remove anthropic_version deletion for token counting (88221be)

Chores

0.33.0 (2024-12-17)

Full Changelog: sdk-v0.32.1...sdk-v0.33.0

Features

  • api: general availability updates (93d1316)
  • api: general availability updates (#631) (b5c92e5)
  • client: add .requestid property to object responses (#596) (9d6d584)
  • internal: make git install file structure match npm (#617) (d3dd7d5)
  • vertex: support token counting (9e76b4d)

Bug Fixes

  • docs: add missing await to pagination example (#609) (e303077)
  • types: remove anthropic-instant-1.2 model (#599) (e222a4d)

Chores

Documentation

  • remove suggestion to use npm call out (#614) (6369261)
  • use latest sonnet in example snippets (#625) (f70882b)

0.32.1 (2024-11-05)

Full Changelog: sdk-v0.32.0...sdk-v0.32.1

Bug Fixes

  • bedrock: don't mutate request body inputs (f83b535)
  • vertex: don't mutate request body inputs (e9a82e5)

0.32.0 (2024-11-04)

Full Changelog: sdk-v0.31.0...sdk-v0.32.0

Features

Bug Fixes

  • don't require deno to run build-deno (#586) (0e431d6)
  • types: add missing token-counting-2024-11-01 (#583) (13d629c)

Chores

0.31.0 (2024-11-01)

Full Changelog: sdk-v0.30.1...sdk-v0.31.0

Features

  • api: add message token counting & PDFs support (#582) (b593837)

Bug Fixes

  • countTokens: correctly set beta header (1680757)
  • internal: support pnpm git installs (#579) (86bb102)
  • types: add missing token-counting-2024-11-01 (aff1546)

Reverts

  • disable isolatedModules and change imports (#575) (2c3b176)

Chores

Documentation

Refactors

  • enable isolatedModules and change imports (#573) (9068b4b)
  • use type imports for type-only imports (#580) (2c8a337)

0.30.1 (2024-10-23)

Full Changelog: sdk-v0.30.0...sdk-v0.30.1

Bug Fixes

  • bedrock: correct messages beta handling (9b57586)
  • vertex: correct messages beta handling (26f21ee)

Chores

  • internal: bumps eslint and related dependencies (#570) (0b3ebb0)

0.30.0 (2024-10-22)

Full Changelog: sdk-v0.29.2...sdk-v0.30.0

Features

  • api: add new model and computer-use-2024-10-22 beta (6981d89)
  • bedrock: add beta.messages.create() method (6317592)
  • vertex: add beta.messages.create() (22cfdba)

Bug Fixes

  • client: respect x-stainless-retry-count default headers (#562) (274573f)

Chores

0.29.2 (2024-10-17)

Full Changelog: sdk-v0.29.1...sdk-v0.29.2

Bug Fixes

  • types: remove misleading betas TypedDict property for the Batch API (#559) (4de5d0a)

0.29.1 (2024-10-15)

Full Changelog: sdk-v0.29.0...sdk-v0.29.1

Bug Fixes

  • beta: merge betas param with the default value (#556) (5520bbc)

Chores

0.29.0 (2024-10-08)

Full Changelog: sdk-v0.28.0...sdk-v0.29.0

Features

  • api: add message batches api (4f114d5)

Chores

  • internal: move LineDecoder to a separate file (#541) (fd42469)
  • internal: pass props through internal parser (#549) (dd71955)

Refactors

0.28.0 (2024-10-04)

Full Changelog: sdk-v0.27.3...sdk-v0.28.0

Features

  • api: support disabling parallel tool use (#540) (df0032f)
  • client: allow overriding retry count header (#536) (ec11f91)
  • client: send retry count header (#533) (401b81c)

Bug Fixes

  • types: remove leftover polyfill usage (#532) (ac188b2)

Chores

  • better object fallback behaviour for casting errors (#503) (3660e97)
  • better object fallback behaviour for casting errors (#526) (4ffb2e4)
  • internal: add dev dependency (#531) (a9c127b)

Documentation

0.27.3 (2024-09-09)

Full Changelog: sdk-v0.27.2...sdk-v0.27.3

Bug Fixes

  • streaming: correct error message serialisation (#524) (e150fa4)
  • uploads: avoid making redundant memory copies (#520) (b6d2638)

Chores

  • docs: update browser support information (#522) (ce7aeb5)

0.27.2 (2024-09-04)

Full Changelog: sdk-v0.27.1...sdk-v0.27.2

Bug Fixes

  • client: correct File construction from node-fetch Responses (#518) (62ae46f)

Chores

0.27.1 (2024-08-27)

Full Changelog: sdk-v0.27.0...sdk-v0.27.1

Chores

0.27.0 (2024-08-21)

Full Changelog: sdk-v0.26.1...sdk-v0.27.0

Features

  • client: add support for browser usage (#504) (93c5f16)

Documentation

  • readme: update formatting and clarity for CORS flag (9cb2c35)

0.26.1 (2024-08-15)

Full Changelog: sdk-v0.26.0...sdk-v0.26.1

Chores

  • ci: add CODEOWNERS file (#498) (c34433f)
  • docs/api: update prompt caching helpers (04195a3)

0.26.0 (2024-08-14)

Full Changelog: sdk-v0.25.2...sdk-v0.26.0

Features

  • api: add prompt caching beta (c920b77)
  • client: add streaming helpers (39abc26)

Chores

0.25.2 (2024-08-12)

Full Changelog: sdk-v0.25.1...sdk-v0.25.2

Chores

0.25.1 (2024-08-09)

Full Changelog: sdk-v0.25.0...sdk-v0.25.1

Chores

0.25.0 (2024-07-29)

Full Changelog: sdk-v0.24.3...sdk-v0.25.0

Features

  • add back compat alias for InputJsonDelta (8b08161)
  • client: make request-id header more accessible (#462) (5ea6f8b)

Bug Fixes

  • compat: remove ReadableStream polyfill redundant since node v16 (#478) (75f5710)
  • use relative paths (#475) (a8ca93c)

Chores

  • bedrock: use chunk for internal SSE parsing instead of completion (#472) (0f6190a)
  • ci: also run workflows for PRs targeting next (#464) (cc405a8)
  • docs: fix incorrect client var names (#479) (a247935)
  • docs: mention lack of support for web browser runtimes (#468) (968a7fb)
  • docs: minor update to formatting of API link in README (#467) (50b9f2b)
  • docs: rename anthropic const to client (#471) (e1a7f9f)
  • docs: use client instead of package name in Node examples (#469) (8961ebf)
  • internal: add constant for default timeout (#480) (dc89753)
  • internal: minor changes to tests (#465) (c1fd563)
  • internal: remove old reference to check-test-server (8dc9afc)
  • sync spec (#470) (b493aa4)
  • tests: update prism version (#473) (6f21ecf)

Refactors

  • extract model out to a named type and rename partialjson (#477) (d2d4e36)

0.24.3 (2024-07-01)

Full Changelog: sdk-v0.24.2...sdk-v0.24.3

Bug Fixes

  • types: avoid errors on certain TS versions (dd6aca5)

0.24.2 (2024-06-28)

Full Changelog: sdk-v0.24.1...sdk-v0.24.2

Bug Fixes

  • partial-json: don't error on unknown tokens (d212ce1)
  • partial-json: handle null token properly (f53742f)

Chores

  • gitignore test server logs (#451) (ee1308f)
  • tests: add unit tests for partial-json-parser (4fb3bea)

0.24.1 (2024-06-25)

Full Changelog: sdk-v0.24.0...sdk-v0.24.1

Bug Fixes

  • api: add string to tool result block (#448) (87af4e9)

Chores

0.24.0 (2024-06-20)

Full Changelog: sdk-v0.23.0...sdk-v0.24.0

Features

  • api: add new claude-3-5-sonnet-20240620 model (#438) (8d60d1b)

0.23.0 (2024-06-14)

Full Changelog: sdk-v0.22.0...sdk-v0.23.0

Features

  • support application/octet-stream request bodies (#436) (3a8e6ed)

Bug Fixes

0.22.0 (2024-05-30)

Full Changelog: sdk-v0.21.1...sdk-v0.22.0

Features

  • api/types: add stream event type aliases with a Raw prefix (#428) (1e367e4)
  • api: tool use is GA and available on 3P (#429) (2decf85)
  • bedrock: support tools (91fc61a)
  • streaming: add tools support (4c83bb1)
  • vertex: support tools (acf0aa7)

Documentation

  • helpers: mention inputJson event (0ef0e39)
  • readme: add bundle size badge (#426) (bf7c1fd)

0.21.1 (2024-05-21)

Full Changelog: sdk-v0.21.0...sdk-v0.21.1

Chores

0.21.0 (2024-05-16)

Full Changelog: sdk-v0.20.9...sdk-v0.21.0

Features

  • api: add tool_choice param, image block params inside tool_result.content, and streaming for tool_use blocks (#418) (421a1e6)

Chores

0.20.9 (2024-05-07)

Full Changelog: sdk-v0.20.8...sdk-v0.20.9

Bug Fixes

  • package: revert recent client file change (#409) (9054249)

Chores

0.20.8 (2024-04-29)

Full Changelog: sdk-v0.20.7...sdk-v0.20.8

Chores

  • internal: add scripts/test and scripts/mock (#403) (bdc6011)
  • internal: use actions/checkout@v4 for codeflow (#400) (6d565d3)

0.20.7 (2024-04-24)

Full Changelog: sdk-v0.20.6...sdk-v0.20.7

Chores

  • internal: use @swc/jest for running tests (#397) (0dbca67)

0.20.6 (2024-04-17)

Full Changelog: sdk-v0.20.5...sdk-v0.20.6

Build System

  • configure UTF-8 locale in devcontainer (#393) (db10244)

0.20.5 (2024-04-15)

Full Changelog: sdk-v0.20.4...sdk-v0.20.5

Chores

0.20.4 (2024-04-11)

Full Changelog: sdk-v0.20.3...sdk-v0.20.4

Chores

0.20.3 (2024-04-10)

Full Changelog: sdk-v0.20.2...sdk-v0.20.3

Bug Fixes

  • vertex: correct core client dependency constraint (#384) (de29699)

0.20.2 (2024-04-09)

Full Changelog: sdk-v0.20.1...sdk-v0.20.2

Chores

0.20.1 (2024-04-04)

Full Changelog: sdk-v0.20.0...sdk-v0.20.1

Documentation

0.20.0 (2024-04-04)

Full Changelog: sdk-v0.19.2...sdk-v0.20.0

Features

Bug Fixes

  • types: correctly mark type as a required property in requests (#371) (a04edd8)

Chores

  • types: consistent naming for text block types (#373) (84a6a58)

0.19.2 (2024-04-04)

Full Changelog: sdk-v0.19.1...sdk-v0.19.2

Bug Fixes

  • streaming: handle special line characters and fix multi-byte character decoding (#370) (7a97b38)

Chores

Documentation

  • readme: change undocumented params wording (#363) (4222e08)

0.19.1 (2024-03-29)

Full Changelog: sdk-v0.19.0...sdk-v0.19.1

Bug Fixes

  • client: correctly send deno version header (#354) (ad5162b)
  • handle process.env being undefined in debug func (#351) (3b0f38a)
  • streaming: correct accumulation of output tokens (#361) (76af283)
  • types: correct typo claude-2.1' to claude-2.1 (#352) (0d5efb9)

Chores

Documentation

  • bedrock: fix dead link (#356) (a953e00)
  • readme: consistent use of sentence case in headings (#347) (30f45d1)
  • readme: document how to make undocumented requests (#349) (f92c50a)

0.19.0 (2024-03-19)

Full Changelog: sdk-v0.18.0...sdk-v0.19.0

Features

  • vertex: add support for overriding google auth (#338) (28d98c4)
  • vertex: api is no longer in private beta (#344) (892127c)

Bug Fixes

  • internal: make toFile use input file's options (#343) (2dc2174)

Chores

  • internal: update generated pragma comment (#341) (fd60f63)

Documentation

0.18.0 (2024-03-13)

Full Changelog: sdk-v0.17.2...sdk-v0.18.0

Features

Documentation

0.17.2 (2024-03-12)

Full Changelog: sdk-v0.17.1...sdk-v0.17.2

Chores

  • internal: add explicit type annotation to decoder (#324) (7e172c7)

0.17.1 (2024-03-06)

Full Changelog: sdk-v0.17.0...sdk-v0.17.1

Documentation

  • deprecate old access token getter (#322) (1110548)
  • remove extraneous --save and yarn install instructions (#323) (775ecb9)

0.17.0 (2024-03-06)

Full Changelog: sdk-v0.16.1...sdk-v0.17.0

Features

  • api: add enum to model param for message (#315) (0c44de0)

Bug Fixes

  • streaming: correctly handle trailing new lines in byte chunks (#317) (0147b46)

Chores

  • types: fix accidental exposure of Buffer type to cloudflare (#319) (a5e4462)

Documentation

0.16.1 (2024-03-04)

Full Changelog: sdk-v0.16.0...sdk-v0.16.1

Chores

Documentation

0.16.0 (2024-03-04)

Full Changelog: sdk-v0.15.0...sdk-v0.16.0

Features

Chores

0.15.0 (2024-03-04)

Full Changelog: sdk-v0.14.1...sdk-v0.15.0

Features

  • messages: add support for image inputs (#303) (7663bd6)

Bug Fixes

  • MessageStream: handle errors more gracefully in async iterator (#301) (9cc0daa)

Chores

Documentation

  • contributing: improve wording (#299) (7697fa1)
  • readme: fix typo in custom fetch implementation (#300) (a4974c3)

0.14.1 (2024-02-22)

Full Changelog: sdk-v0.14.0...sdk-v0.14.1

Chores

  • ci: update actions/setup-node action to v4 (#295) (359a856)
  • docs: remove references to old bedrock package (#289) (33b935e)
  • internal: refactor release environment script (#294) (b7f8714)

Documentation

  • readme: fix header for streaming helpers (#293) (7278e6f)

Refactors

0.14.0 (2024-02-13)

Full Changelog: sdk-v0.13.1...sdk-v0.14.0

⚠ BREAKING CHANGES

  • api: messages is generally available (#287)

Features

  • api: messages is generally available (#287) (be0a828)

0.13.1 (2024-02-07)

Full Changelog: sdk-v0.13.0...sdk-v0.13.1

Chores

  • internal: reformat pacakge.json (#284) (3760c68)
  • respect application/vnd.api+json content-type header (#286) (daf0cae)

0.13.0 (2024-02-02)

Full Changelog: sdk-v0.12.8...sdk-v0.13.0

Features

Chores

0.12.8 (2024-02-02)

Full Changelog: sdk-v0.12.7...sdk-v0.12.8

Chores

  • interal: make link to api.md relative (#278) (46f8c28)
  • internal: enable building when git installed (#279) (3065001)

Documentation

0.12.7 (2024-01-31)

Full Changelog: sdk-v0.12.6...sdk-v0.12.7

Chores

  • bedrock: move bedrock SDK to the main repo (#274) (b4ef3a8)
  • ci: fix publish packages script (#272) (db3585d)

0.12.6 (2024-01-30)

Full Changelog: sdk-v0.12.5...sdk-v0.12.6

Chores

  • internal: support pre-release versioning (#270) (566069d)

0.12.5 (2024-01-25)

Full Changelog: sdk-v0.12.4...sdk-v0.12.5

Chores

  • internal: don't re-export streaming type (#267) (bcae5a9)
  • internal: update release-please config (#269) (80952e6)

0.12.4 (2024-01-23)

Full Changelog: sdk-v0.12.3...sdk-v0.12.4

Chores

  • internal: add internal helpers & improve build scripts (#261) (4c1504a)
  • internal: minor streaming updates (#264) (d4414ff)
  • internal: update resource client type (#263) (bc4f115)

0.12.3 (2024-01-19)

Full Changelog: v0.12.2...v0.12.3

Bug Fixes

  • allow body type in RequestOptions to be null (#259) (2f98de1)

0.12.2 (2024-01-18)

Full Changelog: v0.12.1...v0.12.2

Bug Fixes

  • ci: ignore stainless-app edits to release PR title (#258) (87e4ba8)
  • types: accept undefined for optional client options (#257) (a0e2c4a)
  • use default base url if BASE_URL env var is blank (#250) (e38f32f)

Chores

  • internal: debug logging for retries; speculative retry-after-ms support (#256) (b4b70fd)
  • internal: narrow type into stringifyQuery (#253) (3f42e07)

Documentation

0.12.1 (2024-01-08)

Full Changelog: v0.12.0...v0.12.1

Bug Fixes

  • headers: always send lowercase headers and strip undefined (BREAKING in rare cases) (#245) (7703066)

Chores

  • add .keep files for examples and custom code directories (#249) (26b9062)
  • internal: improve type signatures (#247) (40edd29)

0.12.0 (2023-12-21)

Full Changelog: v0.11.0...v0.12.0

⚠ BREAKING CHANGES

  • remove anthropic-beta and x-api-key headers from param types (#243)

Bug Fixes

  • remove anthropic-beta and x-api-key headers from param types (#243) (60f67ae)

Documentation

Refactors

0.11.0 (2023-12-19)

Full Changelog: v0.10.2...v0.11.0

Features

  • api: add messages endpoint with streaming helpers (#235) (12b914f)
  • client: support reading the base url from an env variable (#223) (5bc3600)

Chores

Documentation

Build System

0.10.2 (2023-11-28)

Full Changelog: v0.10.1...v0.10.2

0.10.1 (2023-11-24)

Full Changelog: v0.10.0...v0.10.1

Chores

  • internal: remove file import and conditionally run prepare (#217) (8ac5c7a)

0.10.0 (2023-11-21)

Full Changelog: v0.9.1...v0.10.0

Features

  • allow installing package directly from github (#215) (3de3f1b)

Chores

0.9.1 (2023-11-14)

Full Changelog: v0.9.0...v0.9.1

Chores

0.9.0 (2023-11-05)

Full Changelog: v0.8.1...v0.9.0

Features

Chores

Documentation

0.8.1 (2023-10-25)

Full Changelog: v0.8.0...v0.8.1

Bug Fixes

0.8.0 (2023-10-24)

Full Changelog: v0.7.0...v0.8.0

Features

  • client: adjust retry behavior to be exponential backoff (#192) (747afe2)

0.7.0 (2023-10-19)

Full Changelog: v0.6.8...v0.7.0

Features

0.6.8 (2023-10-17)

Full Changelog: v0.6.7...v0.6.8

Bug Fixes

  • import web-streams-polyfill without overriding globals (#186) (e774e17)

0.6.7 (2023-10-16)

Full Changelog: v0.6.6...v0.6.7

Bug Fixes

  • improve status code in error messages (#183) (7d3bbd4)

Chores

Documentation

  • organisation -> organization (UK to US English) (#185) (70257d4)

Refactors

  • streaming: change Stream constructor signature (#174) (1951824)
  • test: refactor authentication tests (#176) (f59daad)

0.6.6 (2023-10-11)

Full Changelog: v0.6.5...v0.6.6

Chores

0.6.5 (2023-10-11)

Full Changelog: v0.6.4...v0.6.5

Features

  • client: handle retry-after with a date (#162) (31bd609)
  • client: retry on 408 Request Timeout (#151) (3523ffe)
  • client: support importing node or web shims manually (#157) (c1237fe)
  • errors: add status code to error message (#155) (76cf128)
  • package: export a root error type (#160) (51d8d60)

Bug Fixes

  • client: eliminate circular imports, which cause runtime errors in webpack dev bundles (#170) (4a86733)
  • fix namespace exports regression (#171) (0689a91)
  • prevent ReferenceError, update compatibility to ES2020 and Node 18+ (#169) (9753314)

Chores

Documentation

0.6.4 (2023-09-08)

Full Changelog: v0.6.3...v0.6.4

Features

Bug Fixes

  • client: fix TS errors that appear when users Go to Source in VSCode (#142) (f7bfbea)
  • client: handle case where the client is instantiated with a undefined baseURL (#143) (10e5203)
  • client: use explicit file extensions in _shims imports (#141) (10fd687)
  • fix module not found errors in Vercel edge (#148) (72e51a1)
  • readme: update link to api.md to use the correct branch (#145) (5db78ed)

Chores

Documentation

0.6.3 (2023-08-28)

Full Changelog: v0.6.2...v0.6.3

Bug Fixes

  • types: improve getNextPage() return type (#137) (713d603)

Chores

  • ci: setup workflows to create releases and release PRs (#135) (56229d9)

0.6.2 (2023-08-26)

Bug Fixes

  • stream: declare Stream.controller as public (#132) (ff33a89)

Refactors

  • remove unnecessary line in constructor (#131) (dcdf5e5)

Chores

0.6.1 (2023-08-23)

Features

  • allow a default timeout to be set for clients (#113) (1c5b2e2)
  • client: improve compatibility with Bun (#119) (fe4f5d5)
  • docs: add documentation to the client constructor (#118) (79303f9)
  • types: export RequestOptions type (#127) (9769751)
  • types: remove footgun with streaming params (#125) (3ed67b6)

Bug Fixes

  • client: fix TypeError when a request gets retried (#117) (0ade979)
  • core: fix navigator check for strange environments (#124) (c783604)
  • types: add catch-all overload to streaming methods (#123) (7c229a2)

Documentation

Chores

  • assign default reviewers to release PRs (#115) (1df3965)
  • internal: add missing eslint-plugin-prettier (#122) (66bede0)
  • internal: fix error happening in CloudFlare pages (#116) (b0dc7b3)
  • internal: minor reformatting of code (#120) (4bcaf9e)

0.6.0 (2023-08-12)

Features

  • client: add support for accessing the raw response object (#105) (c86b059)
  • client: detect browser usage (#101) (f4cae3f)
  • types: improve streaming params types (#102) (cdf808c)

Documentation

  • readme: minor updates (#107) (406fd97)
  • readme: remove beta status + document versioning policy (#100) (e9ef3d2)

Chores

Refactors

  • client: remove Stream.toReadableStream() (#110) (c370412)

0.5.10 (2023-08-01)

Refactors

Documentation

  • readme: add token counting reference (#94) (2c6a699)

Chores

  • internal: allow the build script to be run without yarn installed (#91) (9bd2b28)
  • internal: fix deno build (#96) (3fdab4e)

0.5.9 (2023-07-29)

Bug Fixes

  • client: handle undefined process in more places (#87) (d950c25)
  • examples: avoid swallowing errors in example scripts (#82) (b27cfe9)
  • fix undefined message in errors (#86) (5714a14)

Chores

  • internal: minor refactoring of client instantiation (#88) (2c53e1c)

Refactors

  • use destructuring arguments in client constructor and respect false values (#89) (8d4c686)

0.5.8 (2023-07-22)

Features

  • streaming: make requests immediately throw an error if an aborted signal is passed in (#79) (5c86597)

0.5.7 (2023-07-19)

Features

  • add flexible enum to model param (#73) (a6bbcad)
  • client: export ClientOptions interface (#75) (0315ce1)
  • deps: remove unneeded qs dep (#72) (0aea5a6)

Bug Fixes

  • client: fix errors with file uploads in the browser (#76) (ac48fa7)
  • fix error in environments without TextEncoder (#70) (5b78e05)
  • fix export map order (#74) (51e70cb)

0.5.6 (2023-07-15)

Bug Fixes

  • fix errors with "named" client export in CJS (#67) (08ef69c)

0.5.5 (2023-07-13)

Features

  • client: add support for passing a signal request option (#55) (09604e9)

Bug Fixes

  • streaming: do not abort successfully completed streams (#53) (950dd49)

Documentation

  • examples: bump model to claude-2 in example scripts (#57) (f85c05d)
  • readme: improvements to formatting code snippets (#58) (67bae64)

Chores

  • internal: add helper function for b64 (#62) (04e303c)
  • internal: let toFile helper accept promises to objects with name/type properties (#63) (93f9af2)
  • internal: remove unneeded type var usage (#59) (42fc4a9)

0.5.4 (2023-07-11)

Features

  • api: reference claude-2 in examples (#50) (7c53ded)
  • client: support passing a custom fetch function (#46) (7d54366)

Bug Fixes

  • client: properly handle multi-byte characters in Content-Length (#47) (8dfff26)

Refactors

  • streaming: make response body streaming polyfill more spec-compliant (#44) (047d328)