Détail du package

openai

openai16.5mApache-2.05.0.1

The official TypeScript library for the OpenAI API

readme

OpenAI TypeScript and JavaScript API Library

NPM version npm bundle size JSR Version

This library provides convenient access to the OpenAI REST API from TypeScript or JavaScript.

It is generated from our OpenAPI specification with Stainless.

To learn how to use the OpenAI API, check out our API Reference and Documentation.

Installation

npm install openai

Installation from JSR

deno add jsr:@openai/openai
npx jsr add @openai/openai

These commands will make the module importable from the @openai/openai scope. You can also import directly from JSR without an install step if you're using the Deno JavaScript runtime:

import OpenAI from 'jsr:@openai/openai';

Usage

The full API of this library can be found in api.md file along with many code examples.

The primary API for interacting with OpenAI models is the Responses API. You can generate text from the model with the code below.

import OpenAI from 'openai';

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

const response = await client.responses.create({
  model: 'gpt-4o',
  instructions: 'You are a coding assistant that talks like a pirate',
  input: 'Are semicolons optional in JavaScript?',
});

console.log(response.output_text);

The previous standard (supported indefinitely) for generating text is the Chat Completions API. You can use that API to generate text from the model with the code below.

import OpenAI from 'openai';

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

const completion = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [
    { role: 'developer', content: 'Talk like a pirate.' },
    { role: 'user', content: 'Are semicolons optional in JavaScript?' },
  ],
});

console.log(completion.choices[0].message.content);

Streaming responses

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

import OpenAI from 'openai';

const client = new OpenAI();

const stream = await client.responses.create({
  model: 'gpt-4o',
  input: 'Say "Sheep sleep deep" ten times fast!',
  stream: true,
});

for await (const event of stream) {
  console.log(event);
}

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
import fs from 'fs';
import OpenAI, { toFile } from 'openai';

const client = new OpenAI();

// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
await client.files.create({ file: fs.createReadStream('input.jsonl'), purpose: 'fine-tune' });

// Or if you have the web `File` API you can pass a `File` instance:
await client.files.create({ file: new File(['my bytes'], 'input.jsonl'), purpose: 'fine-tune' });

// You can also pass a `fetch` `Response`:
await client.files.create({ file: await fetch('https://somesite/input.jsonl'), purpose: 'fine-tune' });

// Finally, if none of the above are convenient, you can use our `toFile` helper:
await client.files.create({
  file: await toFile(Buffer.from('my bytes'), 'input.jsonl'),
  purpose: 'fine-tune',
});
await client.files.create({
  file: await toFile(new Uint8Array([0, 1, 2]), 'input.jsonl'),
  purpose: 'fine-tune',
});

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 job = await client.fineTuning.jobs
    .create({ model: 'gpt-4o', training_file: 'file-abc123' })
    .catch(async (err) => {
      if (err instanceof OpenAI.APIError) {
        console.log(err.request_id);
        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 x-request-id response header so that you can quickly log failing requests and report them back to OpenAI.

const completion = await client.chat.completions.create({
  messages: [{ role: 'user', content: 'Say this is a test' }],
  model: 'gpt-4o',
});
console.log(completion._request_id); // req_123

You can also access the Request ID using the .withResponse() method:

const { data: stream, request_id } = await openai.chat.completions
  .create({
    model: 'gpt-4',
    messages: [{ role: 'user', content: 'Say this is a test' }],
    stream: true,
  })
  .withResponse();

Realtime API Beta

The Realtime API enables you to build low-latency, multi-modal conversational experiences. It currently supports text and audio as both input and output, as well as function calling through a WebSocket connection.

import { OpenAIRealtimeWebSocket } from 'openai/beta/realtime/websocket';

const rt = new OpenAIRealtimeWebSocket({ model: 'gpt-4o-realtime-preview-2024-12-17' });

rt.on('response.text.delta', (event) => process.stdout.write(event.delta));

For more information see realtime.md.

Microsoft Azure OpenAI

To use this library with Azure OpenAI, use the AzureOpenAI class instead of the OpenAI class.

[!IMPORTANT] The Azure API shape slightly differs from the core API shape which means that the static types for responses / params won't always be correct.

import { AzureOpenAI } from 'openai';
import { getBearerTokenProvider, DefaultAzureCredential } from '@azure/identity';

const credential = new DefaultAzureCredential();
const scope = 'https://cognitiveservices.azure.com/.default';
const azureADTokenProvider = getBearerTokenProvider(credential, scope);

const openai = new AzureOpenAI({ azureADTokenProvider });

const result = await openai.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Say hello!' }],
});

console.log(result.choices[0]!.message?.content);

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 OpenAI({
  maxRetries: 0, // default is 2
});

// Or, configure per-request:
await client.chat.completions.create({ messages: [{ role: 'user', content: 'How can I get the name of the current day in JavaScript?' }], model: 'gpt-4o' }, {
  maxRetries: 5,
});

Timeouts

Requests time out after 10 minutes by default. You can configure this with a timeout option:

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

// Override per-request:
await client.chat.completions.create({ messages: [{ role: 'user', content: 'How can I list all files in a directory using Python?' }], model: 'gpt-4o' }, {
  timeout: 5 * 1000,
});

On timeout, an APIConnectionTimeoutError is thrown.

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

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 x-request-id response header so that you can quickly log failing requests and report them back to OpenAI.

const response = await client.responses.create({ model: 'gpt-4o', input: 'testing 123' });
console.log(response._request_id); // req_123

You can also access the Request ID using the .withResponse() method:

const { data: stream, request_id } = await openai.responses
  .create({
    model: 'gpt-4o',
    input: 'Say this is a test',
    stream: true,
  })
  .withResponse();

Auto-pagination

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

async function fetchAllFineTuningJobs(params) {
  const allFineTuningJobs = [];
  // Automatically fetches more pages as needed.
  for await (const fineTuningJob of client.fineTuning.jobs.list({ limit: 20 })) {
    allFineTuningJobs.push(fineTuningJob);
  }
  return allFineTuningJobs;
}

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

let page = await client.fineTuning.jobs.list({ limit: 20 });
for (const fineTuningJob of page.data) {
  console.log(fineTuningJob);
}

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

Realtime API Beta

The Realtime API enables you to build low-latency, multi-modal conversational experiences. It currently supports text and audio as both input and output, as well as function calling through a WebSocket connection.

import { OpenAIRealtimeWebSocket } from 'openai/beta/realtime/websocket';

const rt = new OpenAIRealtimeWebSocket({ model: 'gpt-4o-realtime-preview-2024-12-17' });

rt.on('response.text.delta', (event) => process.stdout.write(event.delta));

For more information see realtime.md.

Microsoft Azure OpenAI

To use this library with Azure OpenAI, use the AzureOpenAI class instead of the OpenAI class.

[!IMPORTANT] The Azure API shape slightly differs from the core API shape which means that the static types for responses / params won't always be correct.

import { AzureOpenAI } from 'openai';
import { getBearerTokenProvider, DefaultAzureCredential } from '@azure/identity';

const credential = new DefaultAzureCredential();
const scope = 'https://cognitiveservices.azure.com/.default';
const azureADTokenProvider = getBearerTokenProvider(credential, scope);

const openai = new AzureOpenAI({
  azureADTokenProvider,
  apiVersion: '<The API version, e.g. 2024-10-01-preview>',
});

const result = await openai.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Say hello!' }],
});

console.log(result.choices[0]!.message?.content);

For more information on support for the Azure API, see azure.md.

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 OpenAI();

const httpResponse = await client.responses
  .create({ model: 'gpt-4o', input: 'say this is a test.' })
  .asResponse();

// access the underlying web standard Response object
console.log(httpResponse.headers.get('X-My-Header'));
console.log(httpResponse.statusText);

const { data: modelResponse, response: raw } = await client.responses
  .create({ model: 'gpt-4o', input: 'say this is a test.' })
  .withResponse();
console.log(raw.headers.get('X-My-Header'));
console.log(modelResponse);

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 OPENAI_LOG environment variable
  2. Using the logLevel client option (overrides the environment variable if set)
import OpenAI from 'openai';

const client = new OpenAI({
  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 OpenAI from 'openai';
import pino from 'pino';

const logger = pino();

const client = new OpenAI({
  logger: logger.child({ name: 'OpenAI' }),
  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

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 OpenAI from 'openai';
import fetch from 'my-fetch';

const client = new OpenAI({ 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 OpenAI from 'openai';

const client = new OpenAI({
  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 OpenAI from 'openai';
import * as undici from 'undici';

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

Bun [docs]

import OpenAI from 'openai';

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

Deno [docs]

import OpenAI from 'npm:openai';

const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
const client = new OpenAI({
  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. 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.
    • Public APIs with Limited Scope: If your API has very limited scope and the exposed credentials do not grant access to sensitive data or critical operations, the potential impact of exposure is reduced.
    • 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

5.0.1 (2025-05-29)

Full Changelog: v5.0.0...v5.0.1

Chores

5.0.0 (2025-05-29)

Full Changelog: v5.0.0-alpha.0...v5.0.0

Features

  • add audio helpers (ec5067d)
  • add migration guide (cfd2088)
  • add SKIP_BREW env var to ./scripts/bootstrap (7ea4a24)
  • api: add /v1/responses and built-in tools (91af47c)
  • api: add /v1/responses and built-in tools (0612242)
  • api: add get /chat/completions endpoint (9697139)
  • api: add get /chat/completions endpoint (16c67be)
  • api: add get /responses/{response_id}/input_items endpoint (f2c5aba)
  • api: add get /responses/{response_id}/input_items endpoint (3676d34)
  • api: add container endpoint (3ffca5c)
  • api: add container endpoint (e973476)
  • api: Add evalapi to sdk (70092d7)
  • api: Add evalapi to sdk (#1456) (33b66f5)
  • api: add gpt-4.5-preview (1d4478d)
  • api: add gpt-4.5-preview (#1349) (bb269a1)
  • api: add image sizes, reasoning encryption (0c25021)
  • api: add image sizes, reasoning encryption (31cd88f)
  • api: add o3 and o4-mini model IDs (19cda5d)
  • api: add o3 and o4-mini model IDs (a0d0000)
  • api: Add reinforcement fine-tuning api support (e6bbaf5)
  • api: Add reinforcement fine-tuning api support (fabe6ec)
  • api: add support for storing chat completions (59da177)
  • api: add support for storing chat completions (#1327) (be1ca6b)
  • api: adding gpt-4.1 family of model IDs (8a2a745)
  • api: adding gpt-4.1 family of model IDs (840e7de)
  • api: adding new image model support (a0010fd)
  • api: adding new image model support (c353531)
  • api: Config update for pakrym-stream-param (71c3d31)
  • api: Config update for pakrym-stream-param (b4d1b46)
  • api: Config update for pakrym-stream-param (469ad7b)
  • api: further updates for evals API (3019a7e)
  • api: further updates for evals API (3f6f248)
  • api: manual updates (debe529)
  • api: manual updates (e83286b)
  • api: manual updates (959eace)
  • api: manual updates (179a607)
  • api: manual updates (0cb0c86)
  • api: manual updates (678ae6b)
  • api: manual updates (4560dc6)
  • api: manual updates (554c3b1)
  • api: manual updates (b893d81)
  • api: manual updates (c1c2819)
  • api: manual updates (efce6d3)
  • api: manual updates (32afb00)
  • api: new API tools (0cc8994)
  • api: new API tools (fb4014f)
  • api: new models for TTS, STT, + new audio features for Realtime (1eab9ed)
  • api: new models for TTS, STT, + new audio features for Realtime (#1407) (d11b13c)
  • api: new streaming helpers for background responses (c071491)
  • api: new streaming helpers for background responses (1ddd6ff)
  • api: o1-pro now available through the API (3540b06)
  • api: o1-pro now available through the API (#1398) (aefd267)
  • api: responses x eval api (b349ade)
  • api: responses x eval api (ea1d56c)
  • api: Updating Assistants and Evals API schemas (e68f598)
  • api: Updating Assistants and Evals API schemas (8cc63d3)
  • client: accept RFC6838 JSON content types (67da9ce)
  • client: add Realtime API support (7737d25)
  • client: add withOptions helper (7e9ea85)
  • client: improve logging (ead0ba4)
  • client: promote beta completions methods to GA (4c622f9)
  • version 5 (855144b)
  • version 5 (855144b)

Bug Fixes

  • api: add missing file rank enum + more metadata (b943a0a)
  • api: correct some Responses types (3ca8965)
  • api: correct some Responses types (#1391) (e983d0c)
  • api: improve type resolution when importing as a package (b6bf469)
  • api: improve type resolution when importing as a package (#1444) (4af79dd)
  • assistants: handle thread.run.incomplete event (a2714bb)
  • audio: correctly handle transcription streaming (9c7d352)
  • avoid type error in certain environments (#1413) (f395e95)
  • azure/audio: use model param for deployments (0eda70a)
  • azure: add /images/edits to deployments endpoints (#1509) (4b18059)
  • azure: add /images/edits to deployments endpoints (#1509) (84fc31a)
  • azure: use correct internal method (a9c7821)
  • client: always overwrite when merging headers (c160550)
  • client: fix export map for index exports (#1328) (26d5868)
  • client: fix export map for index exports, accept BunFile (9416c96)
  • client: fix TypeError with undefined File (0e980d0)
  • client: remove duplicate types (bee2ce5)
  • client: remove duplicate types (#1410) (23fd3ff)
  • client: return binary content from get /containers/{container_id}/files/{file_id}/content (8502966)
  • client: return binary content from get /containers/{container_id}/files/{file_id}/content (899869b)
  • client: return binary content from get /containers/{container_id}/files/{file_id}/content (83129d7)
  • client: send X-Stainless-Timeout in seconds (5a272a7)
  • client: send X-Stainless-Timeout in seconds (#1442) (5e5e460)
  • client: send all configured auth headers (ee01414)
  • compat with more runtimes (f743730)
  • correct imports (21f2107)
  • correctly decode multi-byte characters over multiple chunks (f3d7083)
  • docs: correct docstring on responses.stream (1847673)
  • ecosystem-tests/bun: bump dependencies (1e52734)
  • ecosystem-tests/cloudflare-worker: ignore lib errors for now (157248a)
  • ecosystem-tests: correct ecosystem tests setup (6fa0675)
  • embeddings: correctly decode base64 data (#1448) (d6b99c8)
  • exports: add missing type exports (a816029)
  • exports: add missing type exports (#1417) (06c03d7)
  • exports: ensure resource imports don't require /index (d028ad7)
  • helpers/zod: error on optional + not nullable fields (6e424b5)
  • internal: add mts file + crypto shim types (a06deb8)
  • internal: clean up undefined File test (da43aa9)
  • internal: fix file uploads in node 18 jest (abfff03)
  • internal: work around https://github.com/vercel/next.js/issues/76881 (#1427) (84edc62)
  • jsr: correct zod config (04e30c0)
  • jsr: export realtime helpers (0ea64eb)
  • jsr: export zod helpers (77e1180)
  • mcp: remove unused tools.ts (752f4f1)
  • mcp: remove unused tools.ts (#1445) (4ba9947)
  • optimize sse chunk reading off-by-one error (a7effe8)
  • optimize sse chunk reading off-by-one error (#1339) (b0b4189)
  • package: add chat/completions.ts back in (#1333) (ee34833)
  • package: add chat/completions.ts back in (#1333) (1f38cc1)
  • parsing: remove tool_calls default empty array (#1341) (40e8dd2)
  • parsing: remove tool_calls default empty array (#1341) (6d056bf)
  • realtime: call .toString() on WebSocket url (#1324) (6e9444c)
  • responses: correct computer use enum value (66fb815)
  • responses: correct reasoning output type (1698b95)
  • responses: correct reasoning output type (9cb9576)
  • responses: correctly add output_text (8ae07cc)
  • responses: support streaming retrieve calls (657807c)
  • tests/embeddings: avoid cross-realm issue (aceaac0)
  • tests: don't rely on OPENAI_API_KEY env variable (087580a)
  • tests: manually reset node:buffer File (1d18ed4)
  • tests: port tests to new setup (9eb9854)
  • tests: stop using node:stream (317a04d)
  • threads: remove unused duplicative types (0b77c7c)
  • types: export AssistantStream (#1472) (bc492ba)
  • types: export ParseableToolsParams (#1486) (3e7c92c)
  • types: ignore missing id in responses pagination (d2be74a)
  • types: improve responses type names (96ed4db)
  • types: improve responses type names (#1392) (4548326)
  • zod: warn on optional field usage (#1469) (aea2d12)

Performance Improvements

Chores

  • add hash of OpenAPI spec/config inputs to .stats.yml (1b0a94d)
  • add hash of OpenAPI spec/config inputs to .stats.yml (48921aa)
  • add missing type alias exports (5d75cb9)
  • add missing type alias exports (#1390) (f4647cc)
  • api: updates to supported Voice IDs (28130c7)
  • api: updates to supported Voice IDs (#1424) (fb0e96a)
  • ci: add timeout thresholds for CI jobs (5775451)
  • ci: add timeout thresholds for CI jobs (939f636)
  • ci: bump node version for release workflows (bbf5d45)
  • ci: only use depot for staging repos (c59c3b5)
  • ci: only use depot for staging repos (214da39)
  • ci: run on more branches and use depot runners (e17a4f8)
  • ci: run on more branches and use depot runners (ead76fc)
  • client: drop support for EOL node versions (a326944)
  • client: expose headers on some streaming errors (#1423) (6c93a23)
  • client: minor internal fixes (5032c28)
  • client: minor internal fixes (6558b7c)
  • client: more accurate streaming errors (0c21914)
  • client: move misc public files to new core/ directory, deprecate old paths (38c9d54)
  • client: only accept standard types for file uploads (53e35c8)
  • deprecate Assistants API (0be23b9)
  • deprecate Assistants API (1726e6b)
  • deprecate Assistants API (5b34fcd)
  • docs: add missing deprecation warnings (5495529)
  • docs: add missing deprecation warnings (995075b)
  • docs: grammar improvements (d5d62b0)
  • docs: grammar improvements (7761cfb)
  • docs: improve docs for withResponse/asResponse (9f4c30b)
  • docs: improve migration doc (732d870)
  • docs: update zod tool call example, fix azure tests (f18ced8)
  • exports: cleaner resource index imports (0da1c16)
  • exports: cleaner resource index imports (#1396) (023d106)
  • exports: stop using path fallbacks (09af7ff)
  • exports: stop using path fallbacks (#1397) (7c3d212)
  • fix example types (20f179d)
  • improve publish-npm script --latest tag logic (6d3cc5c)
  • improve publish-npm script --latest tag logic (1f59811)
  • improve publish-npm script --latest tag logic (6207a2a)
  • internal: add aliases for Record and Array (8957ff4)
  • internal: add aliases for Record and Array (#1443) (1cb66b6)
  • internal: add back release workflow (ca6266e)
  • internal: add Bun.File ecosystem test (cb4194f)
  • internal: add missing return type annotation (00ce31b)
  • internal: add missing return type annotation (#1334) (13aab10)
  • internal: add proxy ecosystem tests (619711a)
  • internal: bump migration cli version (a899c97)
  • internal: codegen related update (fa48353)
  • internal: codegen related update (c735a3c)
  • internal: fix devcontainers setup (873e273)
  • internal: fix devcontainers setup (#1343) (9485f5d)
  • internal: fix eslint ignores (ad5a9b6)
  • internal: fix examples (db23ff3)
  • internal: fix examples (#1457) (a100f0a)
  • internal: fix format script (3e1ea40)
  • internal: fix formatting (6469d53)
  • internal: fix lint (45a372c)
  • internal: fix release workflows (0e4b982)
  • internal: fix release workflows (353349d)
  • internal: fix tests failing on node v18 (c54270a)
  • internal: fix tests not always being type checked (0266b41)
  • internal: improve node 18 shims (ee3f483)
  • internal: minor client file refactoring (d1aa00a)
  • internal: only run examples workflow in main repo (#1450) (93569f3)
  • internal: reduce CI branch coverage (bb39dba)
  • internal: reduce CI branch coverage (77fc77f)
  • internal: refactor utils (e7fbfbc)
  • internal: remove CI condition (ef43345)
  • internal: remove CI condition (#1381) (e905c95)
  • internal: remove unnecessary todo (b55321e)
  • internal: run CI on update-specs branch (9c45ef3)
  • internal: run example files in CI (#1357) (1044c48)
  • internal: share typescript helpers (2470933)
  • internal: skip broken test (5b81f62)
  • internal: skip broken test (#1458) (58f4559)
  • internal: update @types/bun (d94b41a)
  • internal: update release workflows (2cbf49a)
  • internal: upload builds and expand CI branch coverage (3dcbe17)
  • internal: upload builds and expand CI branch coverage (#1460) (2d45287)
  • internal: version bump (b40e830)
  • internal: version bump (5123fe0)
  • internal: version bump (#1393) (2e49526)
  • migration: add beta handling (3508099)
  • move ChatModel type to shared (236dbf4)
  • package: remove engines (500a82f)
  • perf: faster base64 decoding (11b9534)
  • Remove deprecated/unused remote spec feature (00bdda3)
  • Remove deprecated/unused remote spec feature (71950f6)
  • revert temporary version change (47a8350)
  • tests: improve enum examples (0b30331)
  • tests: improve enum examples (#1454) (15a86c9)
  • tests: stop using node-fetch, don't directly upload FormDataFile (ebd464f)
  • tests: switch proxy tests to fetchOptions (da6ed5f)
  • types: improved go to definition on fetchOptions (f1712cd)
  • update next to 14.2.25 for CVE-2025-29927 (1ed4288)
  • workaround build errors (e4a7f67)
  • workaround build errors (d6b396b)

Documentation

  • add examples to tsdocs (e8d2092)
  • fix "procesing" -> "processing" in realtime examples (#1406) (dfbdc65)
  • migration: mention function renames (eb773ee)
  • migration: mention zod helpers error (43b870d)
  • readme: fix typo (c44ed98)
  • readme: fix typo (0989ddc)
  • update URLs from stainlessapi.com to stainless.com (e4e737d)
  • update URLs from stainlessapi.com to stainless.com (#1352) (634a209)

Refactors

  • client: remove deprecated runFunctions method (e29a009)
  • functions: rename function helper methods to include tools (fdd6f66)

4.104.0 (2025-05-29)

Full Changelog: v4.103.0...v4.104.0

Features

  • api: Config update for pakrym-stream-param (469ad7b)

Bug Fixes

  • azure: add /images/edits to deployments endpoints (#1509) (84fc31a)
  • client: return binary content from get /containers/{container_id}/files/{file_id}/content (83129d7)

Chores

  • deprecate Assistants API (5b34fcd)
  • improve publish-npm script --latest tag logic (6207a2a)
  • internal: fix release workflows (353349d)

4.103.0 (2025-05-22)

Full Changelog: v4.102.0...v4.103.0

Features

  • api: new streaming helpers for background responses (1ddd6ff)

4.102.0 (2025-05-21)

Full Changelog: v4.101.0...v4.102.0

Features

  • api: add container endpoint (e973476)

4.101.0 (2025-05-21)

Full Changelog: v4.100.0...v4.101.0

Features

Chores

  • docs: grammar improvements (7761cfb)
  • internal: version bump (b40e830)

4.100.0 (2025-05-16)

Full Changelog: v4.99.0...v4.100.0

Features

  • api: further updates for evals API (3f6f248)

Chores

4.99.0 (2025-05-16)

Full Changelog: v4.98.0...v4.99.0

Features

  • api: manual updates (75eb804)
  • api: responses x eval api (5029f1a)
  • api: Updating Assistants and Evals API schemas (27fd517)

4.98.0 (2025-05-08)

Full Changelog: v4.97.0...v4.98.0

Features

  • api: Add reinforcement fine-tuning api support (4aa7a79)

Chores

  • ci: bump node version for release workflows (2961f63)
  • internal: fix formatting (91a44fe)

Documentation

4.97.0 (2025-05-02)

Full Changelog: v4.96.2...v4.97.0

Features

  • api: add image sizes, reasoning encryption (9c2113a)

Chores

  • docs: add missing deprecation warnings (253392c)

Documentation

  • fix "procesing" -> "processing" in realtime examples (#1406) (8717b9f)
  • readme: fix typo (cab3478)

4.96.2 (2025-04-29)

Full Changelog: v4.96.1...v4.96.2

Bug Fixes

Chores

  • ci: only use depot for staging repos (214da39)
  • ci: run on more branches and use depot runners (ead76fc)

4.96.1 (2025-04-29)

Full Changelog: v4.96.0...v4.96.1

Bug Fixes

Chores

  • ci: only use depot for staging repos (e80af47)
  • ci: run on more branches and use depot runners (b04a801)

4.96.0 (2025-04-23)

Full Changelog: v4.95.1...v4.96.0

Features

  • api: adding new image model support (a00d331)

Bug Fixes

Chores

  • ci: add timeout thresholds for CI jobs (e465063)

4.95.1 (2025-04-18)

Full Changelog: v4.95.0...v4.95.1

Bug Fixes

4.95.0 (2025-04-16)

Full Changelog: v4.94.0...v4.95.0

Features

  • api: add o3 and o4-mini model IDs (4845cd9)

4.94.0 (2025-04-14)

Full Changelog: v4.93.0...v4.94.0

Features

  • api: adding gpt-4.1 family of model IDs (bddcbcf)
  • api: manual updates (7532f48)

Chores

  • client: minor internal fixes (d342f17)
  • internal: reduce CI branch coverage (a49b94a)
  • internal: upload builds and expand CI branch coverage (#1460) (7e23bb4)
  • workaround build errors (913eba8)

4.93.0 (2025-04-08)

Full Changelog: v4.92.1...v4.93.0

Features

Chores

4.92.1 (2025-04-07)

Full Changelog: v4.92.0...v4.92.1

Chores

  • internal: only run examples workflow in main repo (#1450) (5e49a7a)

4.92.0 (2025-04-07)

Full Changelog: v4.91.1...v4.92.0

Features

Bug Fixes

  • api: improve type resolution when importing as a package (#1444) (4aa46d6)
  • client: send X-Stainless-Timeout in seconds (#1442) (aa4206c)
  • embeddings: correctly decode base64 data (#1448) (58128f7)
  • mcp: remove unused tools.ts (#1445) (520a8fa)

Chores

  • internal: add aliases for Record and Array (#1443) (b65391b)

4.91.1 (2025-04-01)

Full Changelog: v4.91.0...v4.91.1

Bug Fixes

  • docs: correct docstring on responses.stream (1c8cd6a)

Chores

  • Remove deprecated/unused remote spec feature (ce3dfa8)

4.91.0 (2025-03-31)

Full Changelog: v4.90.0...v4.91.0

Features

  • api: add get /responses/{response_id}/input_items endpoint (ef0e0ac)

Performance Improvements

4.90.0 (2025-03-27)

Full Changelog: v4.89.1...v4.90.0

Features

  • api: add get /chat/completions endpoint (2d6710a)

Bug Fixes

Chores

  • add hash of OpenAPI spec/config inputs to .stats.yml (45db35e)
  • api: updates to supported Voice IDs (#1424) (404f4db)
  • client: expose headers on some streaming errors (#1423) (b0783cc)

4.89.1 (2025-03-26)

Full Changelog: v4.89.0...v4.89.1

Bug Fixes

Chores

4.89.0 (2025-03-20)

Full Changelog: v4.88.0...v4.89.0

Features

  • add audio helpers (ea1b6b4)
  • api: new models for TTS, STT, + new audio features for Realtime (#1407) (142933a)

Chores

4.88.0 (2025-03-19)

Full Changelog: v4.87.4...v4.88.0

Features

  • api: o1-pro now available through the API (#1398) (616a7e9)

Chores

4.87.4 (2025-03-18)

Full Changelog: v4.87.3...v4.87.4

Bug Fixes

  • api: correct some Responses types (#1391) (af45876)
  • types: ignore missing id in responses pagination (1b9d20e)
  • types: improve responses type names (#1392) (164f476)

Chores

  • add missing type alias exports (#1390) (16c5e22)
  • internal: add back release workflow (dddf29b)
  • internal: remove CI condition (#1381) (ef17981)
  • internal: run CI on update-specs branch (9fc2130)
  • internal: update release workflows (90b77d0)

4.87.3 (2025-03-11)

Full Changelog: v4.87.2...v4.87.3

Bug Fixes

  • responses: correct reasoning output type (2abef57)

4.87.2 (2025-03-11)

Full Changelog: v4.87.1...v4.87.2

Bug Fixes

  • responses: correctly add output_text (4ceb5cc)

4.87.1 (2025-03-11)

Full Changelog: v4.87.0...v4.87.1

Bug Fixes

4.87.0 (2025-03-11)

Full Changelog: v4.86.2...v4.87.0

Features

  • api: add /v1/responses and built-in tools (119b584)

4.86.2 (2025-03-05)

Full Changelog: v4.86.1...v4.86.2

Chores

4.86.1 (2025-02-27)

Full Changelog: v4.86.0...v4.86.1

Documentation

  • update URLs from stainlessapi.com to stainless.com (#1352) (8294e9e)

4.86.0 (2025-02-27)

Full Changelog: v4.85.4...v4.86.0

Features

4.85.4 (2025-02-22)

Full Changelog: v4.85.3...v4.85.4

Chores

4.85.3 (2025-02-20)

Full Changelog: v4.85.2...v4.85.3

Bug Fixes

  • parsing: remove tool_calls default empty array (#1341) (2672160)

4.85.2 (2025-02-18)

Full Changelog: v4.85.1...v4.85.2

Bug Fixes

  • optimize sse chunk reading off-by-one error (#1339) (c82795b)

4.85.1 (2025-02-14)

Full Changelog: v4.85.0...v4.85.1

Bug Fixes

Chores

  • internal: add missing return type annotation (#1334) (53e0856)

4.85.0 (2025-02-13)

Full Changelog: v4.84.1...v4.85.0

Features

  • api: add support for storing chat completions (#1327) (8d77f8e)

Bug Fixes

  • realtime: call .toString() on WebSocket url (#1324) (09bc50d)

4.84.1 (2025-02-13)

Full Changelog: v4.84.0...v4.84.1

Bug Fixes

  • realtime: correct websocket type var constraint (#1321) (afb17ea)

4.84.0 (2025-02-12)

Full Changelog: v4.83.0...v4.84.0

Features

  • pagination: avoid fetching when has_more: false (#1305) (b6944c6)

Bug Fixes

  • api: add missing reasoning effort + model enums (#1302) (14c55c3)
  • assistants: handle thread.run.incomplete event (7032cc4)
  • correctly decode multi-byte characters over multiple chunks (#1316) (dd776c4)

Chores

  • internal: remove segfault-handler dependency (3521ca3)

Documentation

  • readme: cleanup into multiple files (da94424)

4.83.0 (2025-02-05)

Full Changelog: v4.82.0...v4.83.0

Features

Bug Fixes

  • api/types: correct audio duration & role types (#1300) (a955ac2)
  • azure/audio: use model param for deployments (#1297) (85de382)

4.82.0 (2025-01-31)

Full Changelog: v4.81.0...v4.82.0

Features

Bug Fixes

  • examples/realtime: remove duplicate session.update call (#1293) (ad800b4)
  • types: correct metadata type + other fixes (378e2f7)

4.81.0 (2025-01-29)

Full Changelog: v4.80.1...v4.81.0

Features

4.80.1 (2025-01-24)

Full Changelog: v4.80.0...v4.80.1

Bug Fixes

  • azure: include retry count header (3e0ba40)

Documentation

  • fix typo, "zodFunctionTool" -> "zodFunction" (#1128) (b7ab6bb)
  • helpers: fix type annotation (fc019df)
  • readme: fix realtime errors docs link (#1286) (d1d50c8)

4.80.0 (2025-01-22)

Full Changelog: v4.79.4...v4.80.0

Features

  • api: update enum values, comments, and examples (#1280) (d38f2c2)

4.79.4 (2025-01-21)

Full Changelog: v4.79.3...v4.79.4

Bug Fixes

  • jsr: correct zod config (e45fa5f)

Chores

Documentation

4.79.3 (2025-01-21)

Full Changelog: v4.79.2...v4.79.3

Bug Fixes

  • jsr: export zod helpers (9dc55b6)

4.79.2 (2025-01-21)

Full Changelog: v4.79.1...v4.79.2

Chores

Documentation

4.79.1 (2025-01-17)

Full Changelog: v4.79.0...v4.79.1

Bug Fixes

4.79.0 (2025-01-17)

Full Changelog: v4.78.1...v4.79.0

Features

Bug Fixes

  • logs/azure: redact sensitive header when DEBUG is set (#1218) (6a72fd7)

Chores

4.78.1 (2025-01-10)

Full Changelog: v4.78.0...v4.78.1

Bug Fixes

  • send correct Accept header for certain endpoints (#1257) (8756693)

4.78.0 (2025-01-09)

Full Changelog: v4.77.4...v4.78.0

Features

4.77.4 (2025-01-08)

Full Changelog: v4.77.3...v4.77.4

Documentation

4.77.3 (2025-01-03)

Full Changelog: v4.77.2...v4.77.3

Chores

4.77.2 (2025-01-02)

Full Changelog: v4.77.1...v4.77.2

Chores

4.77.1 (2024-12-21)

Full Changelog: v4.77.0...v4.77.1

Bug Fixes

Chores

Documentation

4.77.0 (2024-12-17)

Full Changelog: v4.76.3...v4.77.0

Features

  • api: new o1 and GPT-4o models + preference fine-tuning (#1229) (2e872d4)

Chores

4.76.3 (2024-12-13)

Full Changelog: v4.76.2...v4.76.3

Chores

  • internal: better ecosystem test debugging (86fc0a8)

Documentation

4.76.2 (2024-12-12)

Full Changelog: v4.76.1...v4.76.2

Chores

4.76.1 (2024-12-10)

Full Changelog: v4.76.0...v4.76.1

Chores

  • internal: bump cross-spawn to v7.0.6 (#1217) (c07ad29)
  • internal: remove unnecessary getRequestClient function (#1215) (bef3925)

4.76.0 (2024-12-05)

Full Changelog: v4.75.0...v4.76.0

Features

Chores

4.75.0 (2024-12-03)

Full Changelog: v4.74.0...v4.75.0

Features

4.74.0 (2024-12-02)

Full Changelog: v4.73.1...v4.74.0

Features

  • internal: make git install file structure match npm (#1204) (e7c4c6d)

4.73.1 (2024-11-25)

Full Changelog: v4.73.0...v4.73.1

Documentation

  • readme: mention .withResponse() for streaming request ID (#1202) (b6800d4)

4.73.0 (2024-11-20)

Full Changelog: v4.72.0...v4.73.0

Features

  • api: add gpt-4o-2024-11-20 model (#1201) (0feeafd)
  • bump model in all example snippets to gpt-4o (6961c37)

Bug Fixes

  • docs: add missing await to pagination example (#1190) (524b9e8)

Chores

Documentation

4.72.0 (2024-11-12)

Full Changelog: v4.71.1...v4.72.0

Features

  • add back deno runtime testing without type checks (1626cf5)

Chores

4.71.1 (2024-11-06)

Full Changelog: v4.71.0...v4.71.1

Bug Fixes

  • change release please configuration for jsr.json (#1174) (c39efba)

4.71.0 (2024-11-04)

Full Changelog: v4.70.3...v4.71.0

Features

4.70.3 (2024-11-04)

Full Changelog: v4.70.2...v4.70.3

Bug Fixes

  • change streaming helper imports to be relative (e73b7cf)

4.70.2 (2024-11-01)

Full Changelog: v4.70.1...v4.70.2

Bug Fixes

  • add permissions to github workflow (ee75e00)
  • skip deno ecosystem test (5b181b0)

4.70.1 (2024-11-01)

Full Changelog: v4.70.0...v4.70.1

Bug Fixes

4.70.0 (2024-11-01)

Full Changelog: v4.69.0...v4.70.0

Features

Chores

  • internal: fix isolated modules exports (9cd1958)

Refactors

4.69.0 (2024-10-30)

Full Changelog: v4.68.4...v4.69.0

Features

  • api: add new, expressive voices for Realtime and Audio in Chat Completions (#1157) (12e501c)

Bug Fixes

Documentation

4.68.4 (2024-10-23)

Full Changelog: v4.68.3...v4.68.4

Chores

4.68.3 (2024-10-23)

Full Changelog: v4.68.2...v4.68.3

Chores

  • internal: bumps eslint and related dependencies (#1143) (2643f42)

4.68.2 (2024-10-22)

Full Changelog: v4.68.1...v4.68.2

Chores

4.68.1 (2024-10-18)

Full Changelog: v4.68.0...v4.68.1

Bug Fixes

  • client: respect x-stainless-retry-count default headers (#1138) (266717b)

4.68.0 (2024-10-17)

Full Changelog: v4.67.3...v4.68.0

Features

  • api: add gpt-4o-audio-preview model for chat completions (#1135) (17a623f)

4.67.3 (2024-10-08)

Full Changelog: v4.67.2...v4.67.3

Chores

  • internal: pass props through internal parser (#1125) (5ef8aa8)

4.67.2 (2024-10-07)

Full Changelog: v4.67.1...v4.67.2

Chores

  • internal: move LineDecoder to a separate file (#1120) (0a4be65)

4.67.1 (2024-10-02)

Full Changelog: v4.67.0...v4.67.1

Documentation

  • improve and reference contributing documentation (#1115) (7fa30b3)

4.67.0 (2024-10-01)

Full Changelog: v4.66.1...v4.67.0

Features

  • api: support storing chat completions, enabling evals and model distillation in the dashboard (#1112) (6424924)

4.66.1 (2024-09-30)

Full Changelog: v4.66.0...v4.66.1

Bug Fixes

  • audio: add fallback overload types (0c00a13)
  • audio: use export type (1519100)

4.66.0 (2024-09-27)

Full Changelog: v4.65.0...v4.66.0

Features

  • client: add request_id to .withResponse() (#1095) (2d0f565)

Bug Fixes

  • audio: correct types for transcriptions / translations (#1104) (96e86c2)
  • client: correct types for transcriptions / translations (#1105) (fa16ebb)

4.65.0 (2024-09-26)

Full Changelog: v4.64.0...v4.65.0

Features

4.64.0 (2024-09-25)

Full Changelog: v4.63.0...v4.64.0

Features

  • client: allow overriding retry count header (#1098) (a466ff7)

Bug Fixes

  • audio: correct response_format translations type (#1097) (9a5f461)

Chores

4.63.0 (2024-09-20)

Full Changelog: v4.62.1...v4.63.0

Features

Chores

  • types: improve type name for embedding models (#1089) (d6966d9)

4.62.1 (2024-09-18)

Full Changelog: v4.62.0...v4.62.1

Bug Fixes

4.62.0 (2024-09-17)

Full Changelog: v4.61.1...v4.62.0

Features

  • client: add ._request_id property to object responses (#1078) (d5c2131)

Chores

  • internal: add ecosystem test for qs reproduction (0199dd8)
  • internal: add query string encoder (#1079) (f870682)
  • internal: fix some types (#1082) (1ec41a7)
  • tests: add query string tests to ecosystem tests (36be724)

4.61.1 (2024-09-16)

Full Changelog: v4.61.0...v4.61.1

Bug Fixes

Chores

4.61.0 (2024-09-13)

Full Changelog: v4.60.1...v4.61.0

Bug Fixes

  • client: partial parsing update to handle strings (46e8eb6)
  • examples: handle usage chunk in tool call streaming (#1068) (e4188c4)

Chores

  • examples: add a small delay to tool-calls example streaming (a3fc659)

Documentation

4.60.1 (2024-09-13)

Full Changelog: v4.60.0...v4.60.1

Bug Fixes

  • zod: correctly add $ref definitions for transformed schemas (#1065) (9b93b24)

4.60.0 (2024-09-12)

Full Changelog: v4.59.0...v4.60.0

Features

4.59.0 (2024-09-11)

Full Changelog: v4.58.2...v4.59.0

Features

  • structured outputs: support accessing raw responses (#1058) (af17697)

Documentation

4.58.2 (2024-09-09)

Full Changelog: v4.58.1...v4.58.2

Bug Fixes

  • errors: pass message through to APIConnectionError (#1050) (5a34316)

Chores

  • better object fallback behaviour for casting errors (#1053) (b7d4619)

4.58.1 (2024-09-06)

Full Changelog: v4.58.0...v4.58.1

Chores

  • docs: update browser support information (#1045) (d326cc5)

4.58.0 (2024-09-05)

Full Changelog: v4.57.3...v4.58.0

Features

  • vector store: improve chunking strategy type names (#1041) (471cec3)

Bug Fixes

  • uploads: avoid making redundant memory copies (#1043) (271297b)

4.57.3 (2024-09-04)

Full Changelog: v4.57.2...v4.57.3

Bug Fixes

  • helpers/zod: avoid import issue in certain environments (#1039) (e238daa)

Chores

4.57.2 (2024-09-04)

Full Changelog: v4.57.1...v4.57.2

Chores

4.57.1 (2024-09-03)

Full Changelog: v4.57.0...v4.57.1

Bug Fixes

  • assistants: correctly accumulate tool calls when streaming (#1031) (d935ad3)
  • client: correct File construction from node-fetch Responses (#1029) (22ebdc2)
  • runTools without stream should not emit user message events (#1005) (22ded4d)

Chores

  • internal/tests: workaround bug in recent types/node release (3c7bdfd)

4.57.0 (2024-08-29)

Full Changelog: v4.56.2...v4.57.0

Features

  • api: add file search result details to run steps (#1023) (d9acd0a)

Bug Fixes

  • install examples deps as part of bootstrap script (#1022) (eae8e36)

4.56.2 (2024-08-29)

Full Changelog: v4.56.1...v4.56.2

Chores

4.56.1 (2024-08-27)

Full Changelog: v4.56.0...v4.56.1

Chores

4.56.0 (2024-08-16)

Full Changelog: v4.55.9...v4.56.0

Features

  • api: add chatgpt-4o-latest model (edc4398)

4.55.9 (2024-08-16)

Full Changelog: v4.55.8...v4.55.9

Bug Fixes

  • azure/tts: avoid stripping model param (#999) (c3a7ccd)

4.55.8 (2024-08-15)

Full Changelog: v4.55.7...v4.55.8

Chores

4.55.7 (2024-08-13)

Full Changelog: v4.55.6...v4.55.7

Bug Fixes

  • json-schema: correct handling of nested recursive schemas (#992) (ac309ab)

4.55.6 (2024-08-13)

Full Changelog: v4.55.5...v4.55.6

Bug Fixes

  • zod-to-json-schema: correct licensing (#986) (bd2051e)

4.55.5 (2024-08-12)

Full Changelog: v4.55.4...v4.55.5

Chores

4.55.4 (2024-08-09)

Full Changelog: v4.55.3...v4.55.4

Bug Fixes

  • helpers/zod: nested union schema extraction (#979) (31b05aa)

Chores

4.55.3 (2024-08-08)

Full Changelog: v4.55.2...v4.55.3

Chores

4.55.2 (2024-08-08)

Full Changelog: v4.55.1...v4.55.2

Bug Fixes

  • helpers/zod: add extract-to-root ref strategy (ef3c73c)
  • helpers/zod: add nullableStrategy option (ad89892)
  • helpers/zod: correct logic for adding root schema to definitions (e4a247a)

Chores

  • internal: add README for vendored zod-to-json-schema (d8a80a9)
  • tests: add more API request tests (04c1590)

4.55.1 (2024-08-07)

Full Changelog: v4.55.0...v4.55.1

Bug Fixes

  • helpers/zod: correct schema generation for recursive schemas (cb54d93)

Chores

  • api: remove old AssistantResponseFormat type (#967) (9fd94bf)
  • internal: update test snapshots (bceea60)
  • vendor/zodJsonSchema: add option to duplicate top-level ref (84b8a38)

Documentation

  • examples: add UI generation example script (c75c017)

4.55.0 (2024-08-06)

Full Changelog: v4.54.0...v4.55.0

Features

  • api: add structured outputs support (573787c)

4.54.0 (2024-08-02)

Full Changelog: v4.53.2...v4.54.0

Features

Chores

  • ci: correctly tag pre-release npm packages (#963) (f1a4a68)
  • internal: add constant for default timeout (#960) (55c01f4)
  • internal: cleanup event stream helpers (#950) (8f49956)

Documentation

  • README: link Lifecycle in Polling Helpers section (#962) (c610c81)

4.53.2 (2024-07-26)

Full Changelog: v4.53.1...v4.53.2

Chores

  • docs: fix incorrect client var names (#955) (cc91be8)

4.53.1 (2024-07-25)

Full Changelog: v4.53.0...v4.53.1

Bug Fixes

  • compat: remove ReadableStream polyfill redundant since node v16 (#954) (78b2a83)

Chores

4.53.0 (2024-07-22)

Full Changelog: v4.52.7...v4.53.0

Features

Chores

  • docs: mention support of web browser runtimes (#938) (123d19d)
  • docs: use client instead of package name in Node examples (#941) (8b5db1f)

4.52.7 (2024-07-11)

Full Changelog: v4.52.6...v4.52.7

Documentation

4.52.6 (2024-07-11)

Full Changelog: v4.52.5...v4.52.6

Chores

  • ci: also run workflows for PRs targeting next (#931) (e3f979a)

4.52.5 (2024-07-10)

Full Changelog: v4.52.4...v4.52.5

Bug Fixes

  • vectorStores: correctly handle missing files in uploadAndPoll() (#926) (945fca6)

4.52.4 (2024-07-08)

Full Changelog: v4.52.3...v4.52.4

Refactors

  • examples: removedduplicated 'messageDelta' streaming event. (#909) (7b0b3d2)

4.52.3 (2024-07-02)

Full Changelog: v4.52.2...v4.52.3

Chores

4.52.2 (2024-06-28)

Full Changelog: v4.52.1...v4.52.2

Chores

4.52.1 (2024-06-25)

Full Changelog: v4.52.0...v4.52.1

Chores

4.52.0 (2024-06-18)

Full Changelog: v4.51.0...v4.52.0

Features

  • api: add service tier argument for chat completions (#900) (91e6651)

4.51.0 (2024-06-12)

Full Changelog: v4.50.0...v4.51.0

Features

4.50.0 (2024-06-10)

Full Changelog: v4.49.1...v4.50.0

Features

  • support application/octet-stream request bodies (#892) (51661c8)

4.49.1 (2024-06-07)

Full Changelog: v4.49.0...v4.49.1

Bug Fixes

  • remove erroneous thread create argument (#889) (a9f898e)

4.49.0 (2024-06-06)

Full Changelog: v4.48.3...v4.49.0

Features

4.48.3 (2024-06-06)

Full Changelog: v4.48.2...v4.48.3

Chores

4.48.2 (2024-06-05)

Full Changelog: v4.48.1...v4.48.2

Chores

4.48.1 (2024-06-04)

Full Changelog: v4.48.0...v4.48.1

Bug Fixes

  • resolve typescript issue (1129707)

4.48.0 (2024-06-03)

Full Changelog: v4.47.3...v4.48.0

Features

4.47.3 (2024-05-31)

Full Changelog: v4.47.2...v4.47.3

Bug Fixes

Documentation

  • azure: update example and readme to use Entra ID (#857) (722eff1)

4.47.2 (2024-05-28)

Full Changelog: v4.47.1...v4.47.2

Documentation

4.47.1 (2024-05-14)

Full Changelog: v4.47.0...v4.47.1

Chores

  • internal: add slightly better logging to scripts (#848) (139e690)

4.47.0 (2024-05-14)

Full Changelog: v4.46.1...v4.47.0

Features

4.46.1 (2024-05-13)

Full Changelog: v4.46.0...v4.46.1

Refactors

4.46.0 (2024-05-13)

Full Changelog: v4.45.0...v4.46.0

Features

4.45.0 (2024-05-11)

Full Changelog: v4.44.0...v4.45.0

Features

Chores

4.44.0 (2024-05-09)

Full Changelog: v4.43.0...v4.44.0

Features

4.43.0 (2024-05-08)

Full Changelog: v4.42.0...v4.43.0

Features

4.42.0 (2024-05-06)

Full Changelog: v4.41.1...v4.42.0

Features

  • api: add usage metadata when streaming (#829) (6707f11)

Bug Fixes

4.41.1 (2024-05-06)

Full Changelog: v4.41.0...v4.41.1

Bug Fixes

4.41.0 (2024-05-05)

Full Changelog: v4.40.2...v4.41.0

Features

4.40.2 (2024-05-03)

Full Changelog: v4.40.1...v4.40.2

Bug Fixes

  • package: revert recent client file change (#819) (fa722c9)
  • vectorStores: correct uploadAndPoll method (#817) (d63f22c)

4.40.1 (2024-05-02)

Full Changelog: v4.40.0...v4.40.1

Chores

4.40.0 (2024-05-01)

Full Changelog: v4.39.1...v4.40.0

Features

4.39.1 (2024-04-30)

Full Changelog: v4.39.0...v4.39.1

Chores

4.39.0 (2024-04-29)

Full Changelog: v4.38.5...v4.39.0

Features

Chores

  • internal: add scripts/test and scripts/mock (#801) (6656105)

4.38.5 (2024-04-24)

Full Changelog: v4.38.4...v4.38.5

Chores

  • internal: use actions/checkout@v4 for codeflow (#799) (5ab7780)

4.38.4 (2024-04-24)

Full Changelog: v4.38.3...v4.38.4

Bug Fixes

4.38.3 (2024-04-22)

Full Changelog: v4.38.2...v4.38.3

Chores

  • internal: use @swc/jest for running tests (#793) (8947f19)

4.38.2 (2024-04-19)

Full Changelog: v4.38.1...v4.38.2

Bug Fixes

  • api: correct types for message attachment tools (#787) (8626884)

4.38.1 (2024-04-18)

Full Changelog: v4.38.0...v4.38.1

Bug Fixes

4.38.0 (2024-04-18)

Full Changelog: v4.37.1...v4.38.0

Features

4.37.1 (2024-04-17)

Full Changelog: v4.37.0...v4.37.1

Chores

  • api: docs and response_format response property (#778) (78f5c35)

4.37.0 (2024-04-17)

Full Changelog: v4.36.0...v4.37.0

Features

4.36.0 (2024-04-16)

Full Changelog: v4.35.0...v4.36.0

Features

Build System

  • configure UTF-8 locale in devcontainer (#774) (bebf4f0)

4.35.0 (2024-04-15)

Full Changelog: v4.34.0...v4.35.0

Features

4.34.0 (2024-04-15)

Full Changelog: v4.33.1...v4.34.0

Features

4.33.1 (2024-04-12)

Full Changelog: v4.33.0...v4.33.1

Chores

4.33.0 (2024-04-05)

Full Changelog: v4.32.2...v4.33.0

Features

  • api: add additional messages when creating thread run (#759) (f1fdb41)

4.32.2 (2024-04-04)

Full Changelog: v4.32.1...v4.32.2

Bug Fixes

  • streaming: handle special line characters and fix multi-byte character decoding (#757) (8dcdda2)
  • tests: update wrangler to v3.19.0 (CVE-2023-7080) (#755) (47ca41d)

Chores

  • tests: bump ecosystem tests dependencies (#753) (3f86ea2)

4.32.1 (2024-04-02)

Full Changelog: v4.32.0...v4.32.1

Chores

4.32.0 (2024-04-01)

Full Changelog: v4.31.0...v4.32.0

Features

  • api: add support for filtering messages by run_id (#747) (9a397ac)
  • api: run polling helpers (#749) (02920ae)

Chores

  • deps: remove unused dependency digest-fetch (#748) (5376837)

Documentation

  • readme: change undocumented params wording (#744) (8796691)

Refactors

  • rename createAndStream to stream (02920ae)

4.31.0 (2024-03-30)

Full Changelog: v4.30.0...v4.31.0

Features

Bug Fixes

  • streaming: trigger all event handlers with fromReadableStream (#741) (7b1e593)

4.30.0 (2024-03-28)

Full Changelog: v4.29.2...v4.30.0

Features

Bug Fixes

  • client: correctly send deno version header (#736) (b7ea175)
  • example: correcting example (#739) (a819551)
  • handle process.env being undefined in debug func (#733) (2baa149)
  • internal: make toFile use input file's options (#727) (15880d7)

Chores

Documentation

  • readme: consistent use of sentence case in headings (#729) (7e515fd)
  • readme: document how to make undocumented requests (#730) (a06d861)

4.29.2 (2024-03-19)

Full Changelog: v4.29.1...v4.29.2

Chores

  • internal: update generated pragma comment (#724) (139e205)

Documentation

4.29.1 (2024-03-15)

Full Changelog: v4.29.0...v4.29.1

Documentation

4.29.0 (2024-03-13)

Full Changelog: v4.28.5...v4.29.0

Features

  • assistants: add support for streaming (#714) (7d27d28)

4.28.5 (2024-03-13)

Full Changelog: v4.28.4...v4.28.5

Bug Fixes

  • ChatCompletionStream: abort on async iterator break and handle errors (#699) (ac417a2)
  • streaming: correctly handle trailing new lines in byte chunks (#708) (4753be2)

Chores

  • api: update docs (#703) (e1db98b)
  • docs: mention install from git repo (#700) (c081bdb)
  • fix error handler in readme (#704) (4ff790a)
  • internal: add explicit type annotation to decoder (#712) (d728e99)
  • types: fix accidental exposure of Buffer type to cloudflare (#709) (0323ecb)

Documentation

4.28.4 (2024-02-28)

Full Changelog: v4.28.3...v4.28.4

Features

  • api: add wav and pcm to response_format (#691) (b1c6171)

Chores

  • ci: update actions/setup-node action to v4 (#685) (f2704d5)
  • internal: fix ecosystem tests (#693) (616624d)
  • types: extract run status to a named type (#686) (b3b3b8e)
  • update @types/react to 18.2.58, @types/react-dom to 18.2.19 (#688) (2a0d0b1)
  • update dependency @types/node to v20.11.20 (#690) (4ca005b)
  • update dependency @types/ws to v8.5.10 (#683) (a617268)
  • update dependency next to v13.5.6 (#689) (abb3b66)

4.28.3 (2024-02-20)

Full Changelog: v4.28.2...v4.28.3

Bug Fixes

  • ci: revert "move github release logic to github app" (#680) (8b4009a)

4.28.2 (2024-02-19)

Full Changelog: v4.28.1...v4.28.2

Bug Fixes

  • api: remove non-GA instance_id param (#677) (4d0d4da)

4.28.1 (2024-02-19)

Full Changelog: v4.28.0...v4.28.1

Chores

  • ci: move github release logic to github app (#671) (ecca6bc)
  • internal: refactor release environment script (#674) (27d3770)

4.28.0 (2024-02-13)

Full Changelog: v4.27.1...v4.28.0

Features

4.27.1 (2024-02-12)

Full Changelog: v4.27.0...v4.27.1

4.27.0 (2024-02-08)

Full Changelog: v4.26.1...v4.27.0

Features

  • api: add timestamp_granularities, add gpt-3.5-turbo-0125 model (#661) (5016806)

Chores

  • internal: fix retry mechanism for ecosystem-test (#663) (0eb7ed5)
  • respect application/vnd.api+json content-type header (#664) (f4fad54)

4.26.1 (2024-02-05)

Full Changelog: v4.26.0...v4.26.1

Chores

  • internal: enable building when git installed (#657) (8c80a7d)
  • internal: re-order pagination import (#656) (21ae54e)
  • internal: support pre-release versioning (#653) (0c3859f)
  • test: add delay between ecosystem tests retry (#651) (6a4cc5c)

Documentation

4.26.0 (2024-01-25)

Full Changelog: v4.25.0...v4.26.0

Features

  • api: add text embeddings dimensions param (#650) (1b5a977)

Chores

  • internal: add internal helpers & improve build scripts (#643) (9392f50)
  • internal: adjust ecosystem-tests logging in CI (#646) (156084b)
  • internal: don't re-export streaming type (#648) (4c4be94)
  • internal: fix binary files (#645) (e1fbc39)
  • internal: minor streaming updates (#647) (2f073e4)
  • internal: pin deno version (#649) (7e4b903)

4.25.0 (2024-01-21)

Full Changelog: v4.24.7...v4.25.0

Features

  • api: add usage to runs and run steps (#640) (3caa416)

Bug Fixes

  • allow body type in RequestOptions to be null (#637) (c4f8a36)
  • handle system_fingerprint in streaming helpers (#636) (f273530)
  • types: accept undefined for optional client options (#635) (e48cd57)

Chores

  • internal: debug logging for retries; speculative retry-after-ms support (#633) (fd64971)
  • internal: update comment (#631) (e109d40)

4.24.7 (2024-01-13)

Full Changelog: v4.24.6...v4.24.7

Chores

  • ecosystem-tests: fix flaky vercel-edge, cloudflare-worker, and deno tests (#626) (ae412a5)
  • ecosystem-tests: fix typo in deno test (#628) (048ec94)

4.24.6 (2024-01-12)

Full Changelog: v4.24.5...v4.24.6

Chores

  • ecosystem-tests: fix flaky tests and remove fine tuning calls (#623) (258d79f)
  • ecosystem-tests: fix flaky tests and remove fine tuning calls (#625) (58e5fd8)

4.24.5 (2024-01-12)

Full Changelog: v4.24.4...v4.24.5

Refactors

4.24.4 (2024-01-11)

Full Changelog: v4.24.3...v4.24.4

Chores

  • internal: narrow type into stringifyQuery (#619) (88fb9cd)

4.24.3 (2024-01-10)

Full Changelog: v4.24.2...v4.24.3

Bug Fixes

  • use default base url if BASE_URL env var is blank (#615) (a27ad3d)

4.24.2 (2024-01-08)

Full Changelog: v4.24.1...v4.24.2

Bug Fixes

  • headers: always send lowercase headers and strip undefined (BREAKING in rare cases) (#608) (4ea159f)

Chores

  • add .keep files for examples and custom code directories (#612) (5e0f733)
  • internal: bump license (#605) (045ee74)
  • internal: improve type signatures (#609) (e1ccc82)

Documentation

4.24.1 (2023-12-22)

Full Changelog: v4.24.0...v4.24.1

Bug Fixes

  • pagination: correct type annotation object field (#590) (4066eda)

Documentation

Refactors

4.24.0 (2023-12-19)

Full Changelog: v4.23.0...v4.24.0

Features

  • api: add additional instructions for runs (#586) (401d93e)

Chores

Documentation

  • upgrade models in examples to latest version (#585) (60101a4)

4.23.0 (2023-12-17)

Full Changelog: v4.22.1...v4.23.0

Features

  • api: add token logprobs to chat completions (#576) (8d4292e)

Chores

  • ci: run release workflow once per day (#574) (529f09f)

4.22.1 (2023-12-15)

Full Changelog: v4.22.0...v4.22.1

Chores

Documentation

  • replace runFunctions with runTools in readme (#570) (c3b9ad5)

4.22.0 (2023-12-15)

Full Changelog: v4.21.0...v4.22.0

Features

  • api: add optional name argument + improve docs (#569) (3b68ace)

Chores

4.21.0 (2023-12-11)

Full Changelog: v4.20.1...v4.21.0

Features

  • client: support reading the base url from an env variable (#547) (06fb68d)

Bug Fixes

  • correct some runTools behavior and deprecate runFunctions (#562) (f5cdd0f)
  • prevent 400 when using runTools/runFunctions with Azure OpenAI API (#544) (735d9b8)

Documentation

Build System

4.20.1 (2023-11-24)

Full Changelog: v4.20.0...v4.20.1

Chores

  • internal: remove file import and conditionally run prepare (#533) (48cb729)

Documentation

  • readme: fix typo and add examples link (#529) (cf959b1)

4.20.0 (2023-11-22)

Full Changelog: v4.19.1...v4.20.0

Features

  • allow installing package directly from github (#522) (51926d7)

Chores

  • internal: don't call prepare in dist (#525) (d09411e)

4.19.1 (2023-11-20)

Full Changelog: v4.19.0...v4.19.1

4.19.0 (2023-11-15)

Full Changelog: v4.18.0...v4.19.0

Features

4.18.0 (2023-11-14)

Full Changelog: v4.17.5...v4.18.0

Features

4.17.5 (2023-11-13)

Full Changelog: v4.17.4...v4.17.5

Chores

  • fix typo in docs and add request header for function calls (#494) (22ce244)

4.17.4 (2023-11-10)

Full Changelog: v4.17.3...v4.17.4

Chores

4.17.3 (2023-11-09)

Full Changelog: v4.17.2...v4.17.3

4.17.2 (2023-11-09)

Full Changelog: v4.17.1...v4.17.2

Chores

4.17.1 (2023-11-09)

Full Changelog: v4.17.0...v4.17.1

Refactors

  • client: deprecate files.retrieveContent in favour of files.content (#474) (7c7bfc2)

4.17.0 (2023-11-08)

Full Changelog: v4.16.2...v4.17.0

Features

Refactors

  • api: rename FunctionObject to FunctionDefinition (#470) (f3990c7)

4.16.2 (2023-11-08)

Full Changelog: v4.16.1...v4.16.2

Bug Fixes

  • api: accidentally required params, add new models & other fixes (#463) (1cb403e)
  • api: update embedding response object type (#466) (53b7e25)
  • asssitant_deleted -> assistant_deleted (#452) (ef89bd7)
  • types: ensure all code paths return a value (#458) (19402c3)

Chores

Documentation

  • update deno deploy link to include v (#441) (47b13aa)

4.16.1 (2023-11-06)

Full Changelog: v4.16.0...v4.16.1

Bug Fixes

Documentation

4.16.0 (2023-11-06)

Full Changelog: v4.15.4...v4.16.0

Features

  • api: releases from DevDay; assistants, multimodality, tools, dall-e-3, tts, and more (#433) (fb92f5e)

Bug Fixes

Documentation

4.15.4 (2023-11-05)

Full Changelog: v4.15.3...v4.15.4

Documentation

4.15.3 (2023-11-04)

Full Changelog: v4.15.2...v4.15.3

Bug Fixes

4.15.2 (2023-11-04)

Full Changelog: v4.15.1...v4.15.2

Documentation

4.15.1 (2023-11-04)

Full Changelog: v4.15.0...v4.15.1

Documentation

4.15.0 (2023-11-03)

Full Changelog: v4.14.2...v4.15.0

Features

4.14.2 (2023-10-30)

Full Changelog: v4.14.1...v4.14.2

Chores

4.14.1 (2023-10-27)

Full Changelog: v4.14.0...v4.14.1

Bug Fixes

  • deploy deno in a github workflow instead of postpublish step (#405) (3a6dba0)
  • typo in build script (#403) (76c5c96)

Chores

4.14.0 (2023-10-25)

Full Changelog: v4.13.0...v4.14.0

Features

  • client: adjust retry behavior to be exponential backoff (#400) (2bc14ce)

Chores

4.13.0 (2023-10-22)

Full Changelog: v4.12.4...v4.13.0

Features

4.12.4 (2023-10-17)

Full Changelog: v4.12.3...v4.12.4

Bug Fixes

  • import web-streams-polyfill without overriding globals (#385) (be8e18b)

4.12.3 (2023-10-16)

Full Changelog: v4.12.2...v4.12.3

Documentation

  • organisation -> organization (UK to US English) (#382) (516f0ad)

4.12.2 (2023-10-16)

Full Changelog: v4.12.1...v4.12.2

Bug Fixes

  • client: correctly handle errors during streaming (#377) (09233b1)
  • client: correctly handle errors during streaming (#379) (9ced580)
  • improve status code in error messages (#381) (68dfb17)

Chores

Refactors

  • streaming: change Stream constructor signature (#370) (71984ed)
  • test: refactor authentication tests (#371) (e0d459f)

4.12.1 (2023-10-11)

Full Changelog: v4.12.0...v4.12.1

Bug Fixes

4.12.0 (2023-10-11)

Full Changelog: v4.11.1...v4.12.0

Features

  • api: remove content_filter stop_reason and update documentation (#352) (a4b401e)
  • re-export chat completion types at the top level, and work around webpack limitations (#365) (bb815d0)

Bug Fixes

  • prevent ReferenceError, update compatibility to ES2020 and Node 18+ (#356) (fc71a4b)

Chores

  • internal: minor formatting improvement (#354) (3799863)

4.11.1 (2023-10-03)

Full Changelog: v4.11.0...v4.11.1

4.11.0 (2023-09-29)

Full Changelog: v4.10.0...v4.11.0

Features

Bug Fixes

  • api: add content_filter to chat completion finish reason (#344) (f10c757)

Chores

4.10.0 (2023-09-21)

Full Changelog: v4.9.1...v4.10.0

Features

  • api: add 'gpt-3.5-turbo-instruct', fine-tune error objects, update documentation (#329) (e5f3852)

4.10.0 (2023-09-21)

Full Changelog: v4.9.1...v4.10.0

Features

  • api: add 'gpt-3.5-turbo-instruct', fine-tune error objects, update documentation (#329) (e5f3852)

4.9.1 (2023-09-21)

Full Changelog: v4.9.0...v4.9.1

Documentation

  • README: fix variable names in some examples (#327) (5e05b31)

4.9.0 (2023-09-20)

Full Changelog: v4.8.0...v4.9.0

Features

  • client: support importing node or web shims manually (#325) (628f293)

4.8.0 (2023-09-15)

Full Changelog: v4.7.1...v4.8.0

Features

  • errors: add status code to error message (#315) (9341219)

4.7.1 (2023-09-15)

Full Changelog: v4.7.0...v4.7.1

Documentation

  • declare Bun 1.0 officially supported (#314) (a16e268)

4.7.0 (2023-09-14)

Full Changelog: v4.6.0...v4.7.0

Features

4.6.0 (2023-09-08)

Full Changelog: v4.5.0...v4.6.0

Features

  • types: extract ChatCompletionRole enum to its own type (#298) (5893e37)

Bug Fixes

  • fix module not found errors in Vercel edge (#300) (47c79fe)

4.5.0 (2023-09-06)

Full Changelog: v4.4.0...v4.5.0

Features

  • client: add files.waitForProcessing() method (#292) (ef59010)
  • fixes tests where an array has to have unique enum values (#290) (a10b895)
  • make docs more readable by eliminating unnecessary escape sequences (#287) (a068043)

Bug Fixes

  • client: fix TS errors that appear when users Go to Source in VSCode (#281) (8dc59bc), closes #249
  • client: handle case where the client is instantiated with a undefined baseURL (#285) (5095cf3)
  • client: use explicit file extensions in _shims imports (#276) (16fe929)

Documentation

4.4.0 (2023-09-01)

Full Changelog: v4.3.1...v4.4.0

Features

  • package: add Bun export map (#269) (16f239c)
  • re-export chat completion types at the top level (#268) (1a71a39)
  • tests: unskip multipart form data tests (#275) (47d3e18)
  • types: fix ambiguous auto-import for chat completions params (#266) (19c99fb)

Bug Fixes

  • revert import change which triggered circular import bug in webpack (#274) (6534e36)

4.3.1 (2023-08-29)

Full Changelog: v4.3.0...v4.3.1

Bug Fixes

  • types: improve getNextPage() return type (#262) (245a984)

Chores

  • ci: setup workflows to create releases and release PRs (#259) (290908c)

4.3.0 (2023-08-27)

Features

  • client: add auto-pagination to fine tuning list endpoints (#254) (5f89c5e)
  • cli: rewrite in JS for better compatibility (#244) (d8d7c05)

Bug Fixes

  • stream: declare Stream.controller as public (#252) (81e5de7)

Documentation

Chores

4.2.0 (2023-08-23)

Features

Chores

  • internal: export HeadersInit type shim (#241) (cf9f672)