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.45.0"
".": "6.46.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 263
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-b5b621065906a2579dc180db1236ee3b08a4fca9539accc2fbbf88da0ca3923f.yml
openapi_spec_hash: 45b1b4692b26e714008d8120ccfc7433
config_hash: ef3ce17315a31703e7af0567b3e9738c
configured_endpoints: 270
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-356010b9b9fd6228b457b8fcfa376cf4928a8f3bd4728e7ba5e4b6b5ef4f5843.yml
openapi_spec_hash: 885864ae98a443166f585f856c464fb2
config_hash: 1f1e3b4050e2cb4bc780ce0b70e2b3e6
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 6.46.0 (2026-07-09)

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

### Features

* **api:** gpt-5.6-sol updates ([6c397d5](https://github.com/openai/openai-node/commit/6c397d5d281d6061e88b4a0120fab335ec862a89))


### Bug Fixes

* **assistants:** place array delta entries by index instead of appending ([#1963](https://github.com/openai/openai-node/issues/1963)) ([0e18d30](https://github.com/openai/openai-node/commit/0e18d30a31595acf0fd5e03b8e6bbf8bf31d15d1))
* **runner:** normalize missing tool call IDs ([#1958](https://github.com/openai/openai-node/issues/1958)) ([6371623](https://github.com/openai/openai-node/commit/6371623aadd26ec34a0edecba62a0a10c834b37d))
* upgrade next to 15.5.16 in examples ([#1967](https://github.com/openai/openai-node/issues/1967)) ([95b54e5](https://github.com/openai/openai-node/commit/95b54e5894910e31d01ef418ef0de31e9d653b08))


### Documentation

* add Azure Assistants example ([#1975](https://github.com/openai/openai-node/issues/1975)) ([90a72e5](https://github.com/openai/openai-node/commit/90a72e53452fca62e0c1da42c304eba87d8e87e7)), closes [#701](https://github.com/openai/openai-node/issues/701)
* document assistant stream failures ([#1979](https://github.com/openai/openai-node/issues/1979)) ([d93fbe5](https://github.com/openai/openai-node/commit/d93fbe5bc5a7879ff4a2b81f3840614da6df594e)), closes [#959](https://github.com/openai/openai-node/issues/959)
* document file search result limits ([#1981](https://github.com/openai/openai-node/issues/1981)) ([e9dc283](https://github.com/openai/openai-node/commit/e9dc283dce5a75c569c1aa418f973da69cf7eaae)), closes [#1004](https://github.com/openai/openai-node/issues/1004)

## 6.45.0 (2026-06-24)

Full Changelog: [v6.44.0...v6.45.0](https://github.com/openai/openai-node/compare/v6.44.0...v6.45.0)
Expand Down
5 changes: 5 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ client.example.list(undefined, { headers: { ... } });
- `client.fineTuning.checkpoints.permissions.list()`
- `client.vectorStores.list()`
- `client.vectorStores.files.list()`
- `client.beta.responses.retrieve()`
- `client.beta.responses.delete()`
- `client.beta.responses.cancel()`
- `client.beta.responses.inputItems.list()`
- `client.beta.responses.inputTokens.count()`
- `client.beta.chatkit.threads.list()`
- `client.beta.chatkit.threads.listItems()`
- `client.beta.assistants.list()`
Expand Down
183 changes: 183 additions & 0 deletions api.md

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions examples/responses/multi-agent-streaming.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env -S npm run tsn -- -T

import OpenAI from 'openai';

const client = new OpenAI();

const input = `Proposal Alpha: launch in 2 weeks for $40k using a managed vendor with a 99.9% SLA; data leaves our VPC.
Proposal Beta: launch in 6 weeks for $70k using a self-hosted system with a 99.5% target; data stays in our VPC.
Delegate each proposal to a separate agent, then compare speed, cost, reliability, and security and recommend one.`;

async function main() {
const stream = await client.beta.responses.create({
model: 'gpt-5.6-sol',
input,
multi_agent: { enabled: true },
stream: true,
betas: ['responses_multi_agent=v1'],
});

const agents = new Map<string, string>();
let currentItemID: string | undefined;
for await (const event of stream) {
if (event.type === 'response.output_item.added' && event.item.type === 'message') {
agents.set(event.item.id, event.item.agent?.agent_name ?? '/root');
} else if (event.type === 'response.output_text.delta') {
if (currentItemID !== event.item_id) {
const separator = currentItemID === undefined ? '' : '\n\n';
currentItemID = event.item_id;
const name = agents.get(event.item_id) ?? '/root';
const role = name === '/root' ? 'Coordinator' : 'Agent';
process.stdout.write(`${separator}━━━ ${role}: ${name} ━━━\n\n`);
}
process.stdout.write(event.delta);
}
}
process.stdout.write('\n');
}

main();
50 changes: 50 additions & 0 deletions examples/responses/multi-agent-websocket.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env -S npm run tsn -- -T

import OpenAI from 'openai';
import { ResponsesWS } from 'openai/resources/beta/responses/ws';

const client = new OpenAI();

const input = `Proposal Alpha: launch in 2 weeks for $40k using a managed vendor with a 99.9% SLA; data leaves our VPC.
Proposal Beta: launch in 6 weeks for $70k using a self-hosted system with a 99.5% target; data stays in our VPC.
Delegate each proposal to a separate agent, then compare speed, cost, reliability, and security and recommend one.`;

async function main() {
const ws = new ResponsesWS(client, {
headers: { 'OpenAI-Beta': 'responses_multi_agent=v1' },
});

ws.send({
type: 'response.create',
model: 'gpt-5.6-sol',
input,
multi_agent: { enabled: true },
});

const agents = new Map<string, string>();
let currentItemID: string | undefined;
for await (const message of ws) {
if (message.type === 'error') throw message.error;
if (message.type !== 'message') continue;

const event = message.message;
if (event.type === 'response.output_item.added' && event.item.type === 'message') {
agents.set(event.item.id, event.item.agent?.agent_name ?? '/root');
} else if (event.type === 'response.output_text.delta') {
if (currentItemID !== event.item_id) {
const separator = currentItemID === undefined ? '' : '\n\n';
currentItemID = event.item_id;
const name = agents.get(event.item_id) ?? '/root';
const role = name === '/root' ? 'Coordinator' : 'Agent';
process.stdout.write(`${separator}━━━ ${role}: ${name} ━━━\n\n`);
}
process.stdout.write(event.delta);
} else if (event.type === 'response.completed') {
process.stdout.write('\n');
ws.close();
break;
}
}
}

main();
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.45.0",
"version": "6.46.0",
"exports": {
".": "./index.ts",
"./providers/bedrock": "./providers/bedrock.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": "6.45.0",
"version": "6.46.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <support@openai.com>",
"types": "dist/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions scripts/detect-breaking-changes
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ TEST_PATHS=(
tests/api-resources/vector-stores/files.test.ts
tests/api-resources/vector-stores/file-batches.test.ts
tests/api-resources/beta/beta.test.ts
tests/api-resources/beta/realtime/realtime.test.ts
tests/api-resources/beta/realtime/sessions.test.ts
tests/api-resources/beta/realtime/transcription-sessions.test.ts
tests/api-resources/beta/responses/responses.test.ts
tests/api-resources/beta/responses/input-items.test.ts
tests/api-resources/beta/responses/input-tokens.test.ts
tests/api-resources/beta/chatkit/chatkit.test.ts
tests/api-resources/beta/chatkit/sessions.test.ts
tests/api-resources/beta/chatkit/threads.test.ts
Expand Down
2 changes: 2 additions & 0 deletions src/lib/responses/ResponseInputItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ export function toResponseInputItem(item: ResponseInputItemLike): ResponseInputI
case 'mcp_call':
case 'mcp_list_tools':
case 'message':
case 'program':
case 'program_output':
case 'reasoning':
case 'shell_call':
case 'tool_search_call':
Expand Down
38 changes: 12 additions & 26 deletions src/resources/beta/assistants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1141,19 +1141,12 @@ export interface AssistantCreateParams {
name?: string | null;

/**
* Constrains effort on reasoning for
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
* Reducing reasoning effort can result in faster responses and fewer tokens used
* on reasoning in a response.
*
* - `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.
* - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
* Constrains effort on reasoning for reasoning models. Currently supported values
* are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
* reasoning effort can result in faster responses and fewer tokens used on
* reasoning in a response. Not all reasoning models support every value. See the
* [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for
* model-specific support.
*/
reasoning_effort?: Shared.ReasoningEffort | null;

Expand Down Expand Up @@ -1403,19 +1396,12 @@ export interface AssistantUpdateParams {
name?: string | null;

/**
* Constrains effort on reasoning for
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
* Reducing reasoning effort can result in faster responses and fewer tokens used
* on reasoning in a response.
*
* - `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.
* - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
* Constrains effort on reasoning for reasoning models. Currently supported values
* are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
* reasoning effort can result in faster responses and fewer tokens used on
* reasoning in a response. Not all reasoning models support every value. See the
* [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for
* model-specific support.
*/
reasoning_effort?: Shared.ReasoningEffort | null;

Expand Down
Loading
Loading