Skip to content

release: 4.87.4 #1383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- update-specs
pull_request:
branches:
- master
Expand All @@ -12,7 +13,7 @@ jobs:
lint:
name: lint
runs-on: ubuntu-latest
if: github.repository == 'openai/openai-node'


steps:
- uses: actions/checkout@v4
Expand All @@ -31,7 +32,7 @@ jobs:
build:
name: build
runs-on: ubuntu-latest
if: github.repository == 'openai/openai-node'


steps:
- uses: actions/checkout@v4
Expand All @@ -49,7 +50,6 @@ jobs:
test:
name: test
runs-on: ubuntu-latest
if: github.repository == 'openai/openai-node'

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -88,7 +88,6 @@ jobs:
ecosystem_tests:
name: ecosystem tests (v${{ matrix.node-version }})
runs-on: ubuntu-latest
if: github.repository == 'openai/openai-node'
timeout-minutes: 20
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.87.3"
".": "4.87.4"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 81
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-be834d63e326a82494e819085137f5eb15866f3fc787db1f3afe7168d419e18a.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-f3bce04386c4fcfd5037e0477fbaa39010003fd1558eb5185fe4a71dd6a05fdd.yml
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 4.87.4 (2025-03-18)

Full Changelog: [v4.87.3...v4.87.4](https://github.com/openai/openai-node/compare/v4.87.3...v4.87.4)

### Bug Fixes

* **api:** correct some Responses types ([#1391](https://github.com/openai/openai-node/issues/1391)) ([af45876](https://github.com/openai/openai-node/commit/af458766ac721fb6cf18e7d78c458506c8bfc4e1))
* **types:** ignore missing `id` in responses pagination ([1b9d20e](https://github.com/openai/openai-node/commit/1b9d20e71f5afbd4999f1999fe4810175476c5d2))
* **types:** improve responses type names ([#1392](https://github.com/openai/openai-node/issues/1392)) ([164f476](https://github.com/openai/openai-node/commit/164f47606b41fd3e2850f8209eb1c6e2996a81ff))


### Chores

* add missing type alias exports ([#1390](https://github.com/openai/openai-node/issues/1390)) ([16c5e22](https://github.com/openai/openai-node/commit/16c5e2261c8c1a0ba96c2d5f475e8b1bc67387d7))
* **internal:** add back release workflow ([dddf29b](https://github.com/openai/openai-node/commit/dddf29bd914a02d4586b239ec06217389a4409f9))
* **internal:** remove CI condition ([#1381](https://github.com/openai/openai-node/issues/1381)) ([ef17981](https://github.com/openai/openai-node/commit/ef17981a0bd6b3e971986ece829c5d260d7392d4))
* **internal:** run CI on update-specs branch ([9fc2130](https://github.com/openai/openai-node/commit/9fc2130b74a5919a3bbd41926903bdb310de4446))
* **internal:** update release workflows ([90b77d0](https://github.com/openai/openai-node/commit/90b77d09c04d21487aa38fe775c79ae632136813))

## 4.87.3 (2025-03-11)

Full Changelog: [v4.87.2...v4.87.3](https://github.com/openai/openai-node/compare/v4.87.2...v4.87.3)
Expand Down
8 changes: 7 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ Types:
- <code><a href="./src/resources/responses/responses.ts">ResponseCodeInterpreterToolCall</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseCompletedEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseComputerToolCall</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseComputerToolCallOutputItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseComputerToolCallOutputScreenshot</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseContent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseContentPartAddedEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseContentPartDoneEvent</a></code>
Expand All @@ -564,6 +566,8 @@ Types:
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionCallArgumentsDeltaEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionCallArgumentsDoneEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionToolCall</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionToolCallItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionToolCallOutputItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionWebSearch</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseInProgressEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseIncludable</a></code>
Expand All @@ -575,7 +579,9 @@ Types:
- <code><a href="./src/resources/responses/responses.ts">ResponseInputImage</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseInputItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseInputMessageContentList</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseInputMessageItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseInputText</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputAudio</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseOutputItemAddedEvent</a></code>
Expand Down Expand Up @@ -616,4 +622,4 @@ Types:

Methods:

- <code title="get /responses/{response_id}/input_items">client.responses.inputItems.<a href="./src/resources/responses/input-items.ts">list</a>(responseId, { ...params }) -> ResponseItemListDataPage</code>
- <code title="get /responses/{response_id}/input_items">client.responses.inputItems.<a href="./src/resources/responses/input-items.ts">list</a>(responseId, { ...params }) -> ResponseItemsPage</code>
4 changes: 0 additions & 4 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

errors=()

if [ -z "${STAINLESS_API_KEY}" ]; then
errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.")
fi

if [ -z "${NPM_TOKEN}" ]; then
errors+=("The OPENAI_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi
Expand Down
Empty file removed examples/yarn.lock
Empty file.
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openai/openai",
"version": "4.87.3",
"version": "4.87.4",
"exports": {
".": "./index.ts",
"./helpers/zod": "./helpers/zod.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openai",
"version": "4.87.3",
"version": "4.87.4",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ import {
ChatCompletionModality,
ChatCompletionNamedToolChoice,
ChatCompletionPredictionContent,
ChatCompletionReasoningEffort,
ChatCompletionRole,
ChatCompletionStoreMessage,
ChatCompletionStreamOptions,
Expand All @@ -129,6 +130,7 @@ import {
ChatCompletionUpdateParams,
ChatCompletionUserMessageParam,
ChatCompletionsPage,
CreateChatCompletionRequestMessage,
} from './resources/chat/completions/completions';

export interface ClientOptions {
Expand Down Expand Up @@ -404,6 +406,8 @@ export declare namespace OpenAI {
type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption,
type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam,
type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam,
type CreateChatCompletionRequestMessage as CreateChatCompletionRequestMessage,
type ChatCompletionReasoningEffort as ChatCompletionReasoningEffort,
ChatCompletionsPage as ChatCompletionsPage,
type ChatCompletionCreateParams as ChatCompletionCreateParams,
type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming,
Expand Down
8 changes: 4 additions & 4 deletions src/resources/batches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ export interface BatchCreateParams {

/**
* The endpoint to be used for all requests in the batch. Currently
* `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.
* Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000
* embedding inputs across all requests in the batch.
* `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions`
* are supported. Note that `/v1/embeddings` batches are also restricted to a
* maximum of 50,000 embedding inputs across all requests in the batch.
*/
endpoint: '/v1/chat/completions' | '/v1/embeddings' | '/v1/completions';
endpoint: '/v1/responses' | '/v1/chat/completions' | '/v1/embeddings' | '/v1/completions';

/**
* The ID of an uploaded file that contains requests for the new batch.
Expand Down
18 changes: 12 additions & 6 deletions src/resources/chat/completions/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,13 @@ export interface ChatCompletionChunk {
/**
* An optional field that will only be present when you set
* `stream_options: {"include_usage": true}` in your request. When present, it
* contains a null value except for the last chunk which contains the token usage
* statistics for the entire request.
* contains a null value **except for the last chunk** which contains the token
* usage statistics for the entire request.
*
* **NOTE:** If the stream is interrupted or cancelled, you may not receive the
* final usage chunk which contains the total token usage for the request.
*/
usage?: CompletionsAPI.CompletionUsage | null;
usage?: CompletionsAPI.CompletionUsage;
}

export namespace ChatCompletionChunk {
Expand Down Expand Up @@ -551,7 +554,7 @@ export namespace ChatCompletionContentPart {
/**
* The name of the file, used when passing the file to the model as a string.
*/
file_name?: string;
filename?: string;
}
}
}
Expand Down Expand Up @@ -930,8 +933,11 @@ export interface ChatCompletionStreamOptions {
/**
* If set, an additional chunk will be streamed before the `data: [DONE]` message.
* The `usage` field on this chunk shows the token usage statistics for the entire
* request, and the `choices` field will always be an empty array. All other chunks
* will also include a `usage` field, but with a null value.
* request, and the `choices` field will always be an empty array.
*
* All other chunks will also include a `usage` field, but with a null value.
* **NOTE:** If the stream is interrupted, you may not receive the final usage
* chunk which contains the total token usage for the request.
*/
include_usage?: boolean;
}
Expand Down
7 changes: 1 addition & 6 deletions src/resources/responses/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export {
ResponseItemListDataPage,
InputItems,
type ResponseItemList,
type InputItemListParams,
} from './input-items';
export { InputItems, type ResponseItemList, type InputItemListParams } from './input-items';
export { Responses } from './responses';
Loading