Skip to content
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "6.8.1"
".": "6.9.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 135
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-eeba8addf3a5f412e5ce8d22031e60c61650cee3f5d9e587a2533f6818a249ea.yml
openapi_spec_hash: 0a4d8ad2469823ce24a3fd94f23f1c2b
config_hash: 0bb1941a78ece0b610a2fbba7d74a84c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ca24bc4d8125b5153514ce643c4e3220f25971b7d67ca384d56d493c72c0d977.yml
openapi_spec_hash: c6f048c7b3d29f4de48fde0e845ba33f
config_hash: b876221dfb213df9f0a999e75d38a65e
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 6.9.0 (2025-11-13)

Full Changelog: [v6.8.1...v6.9.0](https://github.com/openai/openai-node/compare/v6.8.1...v6.9.0)

### Features

* **api:** gpt 5.1 ([58e78a8](https://github.com/openai/openai-node/commit/58e78a86899b43eb9afdb6f0afd60b912eae41f2))


### Chores

* add typescript-estree dependency for jsr readme script ([3759514](https://github.com/openai/openai-node/commit/37595149720edd7bf4c11760084cad7753c2f289))

## 6.8.1 (2025-11-05)

Full Changelog: [v6.8.0...v6.8.1](https://github.com/openai/openai-node/compare/v6.8.0...v6.8.1)
Expand Down
9 changes: 9 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -695,12 +695,16 @@ Methods:

Types:

- <code><a href="./src/resources/responses/responses.ts">ApplyPatchTool</a></code>
- <code><a href="./src/resources/responses/responses.ts">ComputerTool</a></code>
- <code><a href="./src/resources/responses/responses.ts">CustomTool</a></code>
- <code><a href="./src/resources/responses/responses.ts">EasyInputMessage</a></code>
- <code><a href="./src/resources/responses/responses.ts">FileSearchTool</a></code>
- <code><a href="./src/resources/responses/responses.ts">FunctionShellTool</a></code>
- <code><a href="./src/resources/responses/responses.ts">FunctionTool</a></code>
- <code><a href="./src/resources/responses/responses.ts">Response</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseApplyPatchToolCall</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseApplyPatchToolCallOutput</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseAudioDeltaEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseAudioDoneEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseAudioTranscriptDeltaEvent</a></code>
Expand Down Expand Up @@ -737,6 +741,9 @@ Types:
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionCallArgumentsDoneEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionCallOutputItem</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionCallOutputItemList</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionShellCallOutputContent</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionShellToolCall</a></code>
- <code><a href="./src/resources/responses/responses.ts">ResponseFunctionShellToolCallOutput</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>
Expand Down Expand Up @@ -799,10 +806,12 @@ Types:
- <code><a href="./src/resources/responses/responses.ts">ResponseWebSearchCallSearchingEvent</a></code>
- <code><a href="./src/resources/responses/responses.ts">Tool</a></code>
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceAllowed</a></code>
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceApplyPatch</a></code>
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceCustom</a></code>
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceFunction</a></code>
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceMcp</a></code>
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceOptions</a></code>
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceShell</a></code>
- <code><a href="./src/resources/responses/responses.ts">ToolChoiceTypes</a></code>
- <code><a href="./src/resources/responses/responses.ts">WebSearchPreviewTool</a></code>
- <code><a href="./src/resources/responses/responses.ts">WebSearchTool</a></code>
Expand Down
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": "6.8.1",
"version": "6.9.0",
"exports": {
".": "./index.ts",
"./helpers/zod": "./helpers/zod.ts",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openai",
"version": "6.8.1",
"version": "6.9.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -37,6 +37,7 @@
"@typescript-eslint/eslint-plugin": "8.31.1",
"@typescript-eslint/parser": "8.31.1",
"deep-object-diff": "^1.1.9",
"@typescript-eslint/typescript-estree": "8.31.1",
"eslint": "^9.20.1",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-unused-imports": "^4.1.4",
Expand Down
14 changes: 10 additions & 4 deletions src/resources/batches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,17 @@ export interface BatchCreateParams {

/**
* The endpoint to be used for all requests in the batch. Currently
* `/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.
* `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`,
* and `/v1/moderations` 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/responses' | '/v1/chat/completions' | '/v1/embeddings' | '/v1/completions';
endpoint:
| '/v1/responses'
| '/v1/chat/completions'
| '/v1/embeddings'
| '/v1/completions'
| '/v1/moderations';

/**
* The ID of an uploaded file that contains requests for the new batch.
Expand Down
28 changes: 18 additions & 10 deletions src/resources/beta/assistants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1160,12 +1160,16 @@ export interface AssistantCreateParams {
/**
* Constrains effort on reasoning for
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
* supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
* effort can result in faster responses and fewer tokens used on reasoning in a
* response.
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
* reasoning effort can result in faster responses and fewer tokens used on
* reasoning in a response.
*
* Note: The `gpt-5-pro` model defaults to (and only supports) `high` reasoning
* effort.
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
* reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
* calls are supported for all reasoning values in gpt-5.1.
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
* support `none`.
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
*/
reasoning_effort?: Shared.ReasoningEffort | null;

Expand Down Expand Up @@ -1416,12 +1420,16 @@ export interface AssistantUpdateParams {
/**
* Constrains effort on reasoning for
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
* supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
* effort can result in faster responses and fewer tokens used on reasoning in a
* response.
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
* reasoning effort can result in faster responses and fewer tokens used on
* reasoning in a response.
*
* Note: The `gpt-5-pro` model defaults to (and only supports) `high` reasoning
* effort.
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
* reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
* calls are supported for all reasoning values in gpt-5.1.
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
* support `none`.
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
*/
reasoning_effort?: Shared.ReasoningEffort | null;

Expand Down
14 changes: 9 additions & 5 deletions src/resources/beta/threads/runs/runs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,12 +725,16 @@ export interface RunCreateParamsBase {
/**
* Body param: Constrains effort on reasoning for
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
* supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
* effort can result in faster responses and fewer tokens used on reasoning in a
* response.
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
* reasoning effort can result in faster responses and fewer tokens used on
* reasoning in a response.
*
* Note: The `gpt-5-pro` model defaults to (and only supports) `high` reasoning
* effort.
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
* reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
* calls are supported for all reasoning values in gpt-5.1.
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
* support `none`.
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
*/
reasoning_effort?: Shared.ReasoningEffort | null;

Expand Down
22 changes: 17 additions & 5 deletions src/resources/chat/completions/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1638,15 +1638,27 @@ export interface ChatCompletionCreateParamsBase {
*/
prompt_cache_key?: string;

/**
* The retention policy for the prompt cache. Set to `24h` to enable extended
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
* of 24 hours.
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
*/
prompt_cache_retention?: 'in-memory' | '24h' | null;

/**
* Constrains effort on reasoning for
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
* supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
* effort can result in faster responses and fewer tokens used on reasoning in a
* response.
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
* reasoning effort can result in faster responses and fewer tokens used on
* reasoning in a response.
*
* Note: The `gpt-5-pro` model defaults to (and only supports) `high` reasoning
* effort.
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
* reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
* calls are supported for all reasoning values in gpt-5.1.
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
* support `none`.
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
*/
reasoning_effort?: Shared.ReasoningEffort | null;

Expand Down
4 changes: 4 additions & 0 deletions src/resources/conversations/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ export type ConversationItem =
| ResponsesAPI.ResponseCodeInterpreterToolCall
| ConversationItem.LocalShellCall
| ConversationItem.LocalShellCallOutput
| ResponsesAPI.ResponseFunctionShellToolCall
| ResponsesAPI.ResponseFunctionShellToolCallOutput
| ResponsesAPI.ResponseApplyPatchToolCall
| ResponsesAPI.ResponseApplyPatchToolCallOutput
| ConversationItem.McpListTools
| ConversationItem.McpApprovalRequest
| ConversationItem.McpApprovalResponse
Expand Down
Loading