npm / openai
openai
What changed in openai 6 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
19 breaking22 security3 deprecations156 new APIs and options4 performance13 behavior and defaults121 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initopenai 7203 changes
Breaking changes 7
Streaming runTools now rejects unfinished turns.
WebSocket constructors for the Responses API now reject function-based API keys.
Rejects incomplete float32 vectors.
Responses WebSockets no longer follow redirects.
Hardens structured-output handling against format downgrade and preserves chat response-format integrity; Zod support is limited to provably JSON-native structured outputs.
Blocks custom credential headers on redirects.
The SDK now requires Node.js 22 and codifies version support, so developers must use Node.js 22 or later.
Security 18
Safely decodes filenames inferred from URLs during uploads.
Callback credentials are kept local to each HTTP request.
WebSocket error messages from the Responses API are formatted safely.
Validates Azure metadata access token values.
First-class X.509 workload credentials are secured.
Rejects run-step identity hijacking before tool callbacks.
Redacts sensitive or malformed payloads from stream diagnostics and prevents sensitive assistant stream data from being retained or leaked.
Bounds SDK event streams and SSE/NDJSON buffering, validates streamed item identities, and rejects malformed Realtime WebSocket frames and named SSE provider error events.
Azure API keys are no longer disclosed across HTTP redirects.
Azure deployment path traversal is prevented.
Bedrock bearer credentials are no longer disclosed across redirects.
Bedrock credentials are contained to the configured endpoint origin.
Prototype manipulation in streamed chat snapshots is prevented.
Multipart upload content-type header injection is prevented.
runTools is hardened against inherited function names.
Streaming upload filename and header injection is prevented.
Redirects are rejected during workload identity token exchange.
Unsafe workload-identity token expirations are rejected.
Deprecations 2
Deprecates connector_id for MCP.
The Sora video APIs are deprecated.
New APIs and options 84
Image requests and responses now support safety identifiers.
Live sessions can now play audio fixtures.
Adds support for using Decisions in Live sessions.
Adds prompt caching options for Decisions, giving developers more control over prompt caching.
Adds support for updating project API key scopes.
Adds support for creating voices from prompts.
Adds response error diagnostics and model notices.
Adds options for regional processing residency, allowing developers to configure where processing occurs.
Adds beta session spending limits.
Adds billing_not_active as a session error code.
Adds browser and computer toolsets for developers to use.
Adds support for image URLs and detailed safety alert explanations.
Adds support for OCI as an external-storage provider.
Adds organization Decisions usage reporting.
Adds support for updating project API key expiry.
Adds shida to the named Live voices.
Adds vault updates and metadata filters.
Adds agent environment suspension and expiration.
Adds support for prewarmed hosted environments.
Adds standalone Decisions support to the API.
Typed function helpers support tool search with defer_loading=true.
Agents can observe local tool failures.
Adds support for agent session events.
Adds support for custom voice creation.
Agents can prepare hosted files.
Agents can download result artifacts.
Adds the ability to list agent session traces.
Beta Agents streams can collect their final output.
Typed application functions can be bound to Agents tools.
Agent streams can parse typed output.
Adds credential and session options for Agents.
Adds Cyber access programs to Responses.
Adds the GPT-6.1 Sol model identifier.
Adds a dedicated Node translation WebSocket.
Adds client secret creation for Realtime Translation.
Adds opt-in incremental output snapshots over WebSocket.
Adds support for GCP external storage.
Adds the GPT-Rosalind research model.
Adds the GPT-6 Luna model identifier for developers to use when selecting a model.
Adds the GPT-6 Sol model identifier for developers to use when selecting a model.
Adds session environment reset events.
Adds support for environment-variable vault credentials.
Adds API support for managing external storage configurations.
Adds support for retrieving safety cases.
Adds webhook events for safety warnings and deactivation.
Adds SIP media security information to incoming call events.
Adds API support for managing webhook endpoints.
Adds model settings for agent sessions.
Adds audio-mini model choices.
Adds managed WebSocket sessions for Responses.
Adds prompt-cache prewarming.
Adds compaction progress events so developers can track progress during compaction.
WebSocket iterators can have per-iterator limits on incoming events.
Adds the Agents API to the SDK.
Adds the Live API to the OpenAI Node SDK.
Adds controls for API key expiration.
Adds GPT Image 2.5 models and image options for use through the API.
Adds prompt cache diagnostics to the API, making cache information available to developers.
Adds expiration fields for service-account API keys.
The SDK adds gpt-6-astra and related features.
Responses and Chat Completions usage now include compute_units.
Adds the obfuscation field to ChatCompletionChunk, making it available to developers consuming chat completion chunks.
Adds support for named data-residency endpoints.
Adds support for backend-mediated Realtime WebRTC calls.
Adds project residency and usage quantity_unit fields to the API types.
Adds pinned X.509 workload token exchange and integrates attested X.509 workload identity into clients.
AzureClientOptions is exported for developers to use.
The SDK adds support for Bedrock Runtime endpoints, allowing developers to use the SDK with those endpoints.
A new Daybreak model identifier is available for use with the API.
A new gpt-5.6-cyber model identifier is available for use with the API.
An ImageDetail type is added to the SDK API.
Workload identity helpers are exported from openai/auth.
Realtime WebSocket connection URLs can now be overridden.
WebSocket events are separated in the API.
A ServiceTier type is added to the SDK API.
The API adds structured errors for MCP.
The API adds an Ultrafast tier.
The API adds structured WebSocket errors.
WebSocket stream IDs are added to the API.
The API adds an event for when a workload identity access token is issued.
Adds the gpt-5.5 model to the API.
Adds tool metadata fields to the API.
Adds content provenance checks to the API.
Adds fast tier support to the API.
Performance 4
Bedrock avoids copying repeated query values, improving performance.
Avoids quadratic comparisons when accumulating long text in Responses.
Quadratic EventStream FIFO draining is eliminated.
Quadratic SSE buffer copying is eliminated.
Behavior and default changes 7
Exposes image tool error and moderation details.
Local tools can run during session creation streams.
Computer use is now available to beta agents.
Usage APIs were updated; developers may need to adjust how they use them.
WebSocket connections now send a default User-Agent.
Function call output no longer requires call IDs, so developers can omit call_id.
Transcription models were updated.
Fixes and other changes 81
Declares Realtime response error messages in the SDK types.
Aligns beta pagination limits and non-null parameters.
Preserves detailed token usage in totalUsage.
Corrects the parameters for custom voice creation.
Structured text is parsed only in final message phases.
Chat Completions now allows the original image detail value.
Corrects the endpoint used to cancel an eval run.
Lane IDs are reserved across WebSocket session replacements.
Credentials are refreshed when a WebSocket reconnects.
Preserves queries on the base URL when joining relative endpoints.
Prevents replay of queued writes whose delivery is uncertain.
Prevents hangs when transcript grouping deadlines are fractional.
Preserves supported streamed logprobs and provisional metadata in Responses.
Preserves model choices and improves request handling.
Preserves request options in legacy GET calls.
Validates WebSocket results and preserves header defaults.
Chat runners now preserve abort reasons.
Realtime handling now preserves native WebSocket error causes.
Strict schemas now omit an impossible optional branch.
Streaming now emits terminal SSE events even when they lack a trailing blank line.
Malformed WebSocket events are handled, and buffering is improved.
Unread events are discarded when an iterator returns.
Rejects root IDs in run-step deltas.
Preserves suppressed workload authorization.
Uses ALSA card identifiers when recording audio.
Preserves API error classification for streamed errors.
Waits for input cleanup to finish before reporting recording success.
Prefers readable inputs over body metadata when handling audio inputs.
Signals only recording processes that have started.
Cancels Bedrock requests that are awaiting AWS credentials.
Rejects zero batch upload concurrency.
Treats cancelled vector store files as terminal rather than continuing to poll.
Accepts ArrayBuffers originating in another realm for uploads.
Supports the Edge Runtime when Node process is unavailable.
Preserves numeric embedding output when request bodies are overridden.
Preserves numeric responses after request hooks run.
Validates the response collection before decoding embeddings.
Preserves explicitly empty filenames during uploads.
Corrects the fields reported in function argument completion events.
Preserves alternate Headers inputs.
Parses JSON media types without case sensitivity.
Parses namespaced function tools in Responses.
Follows next cursors through empty pages so pagination can continue.
Bounds partial number recovery to its token.
Honors zero as a custom polling interval.
Preserves routing components in the Realtime base URL.
Validates indexed response collections.
Omits parsed values from replayed Responses history.
Rejects invalid retry counts.
Preserves retry delays when work runs in parallel workers.
Interrupts pending reads when a stream is cancelled.
Surfaces server error frames and settles streams even after listeners throw.
Retains terminal message snapshots so they remain available after completion.
Accounts for elapsed time during token exchange.
Serializes tool-call IDs once per completion.
Treats a cancelled vector store file as a terminal polling state.
Recognizes the incomplete status for web search calls.
Carries declared options through withOptions and fixes Azure deployment paths.
CommonJS now loads under browser export conditions.
CommonJS package imports are supported with Jest 28.
Multipart bodies are detected from own properties only.
Native browser ESM imports are restored.
WebSocket waiters are settled when listeners throw.
The workload-identity refresh buffer is clamped to the token lifetime.
Cancellation is now honored while decoding SSE responses.
Preserves Blob files and multipart media types during uploads.
Honors cancellation during polling delays and Bedrock bearer credential resolution, and stops delayed or additional tool callbacks after cancellation.
Preserves large streaming responses.
Preserves array order when creating multipart uploads.
Prevents logprobs from being double-counted in streamed chat completions.
Bounds the work performed during webhook signature verification.
The audio upload metadata requirements are clarified.
Mid-stream errors are surfaced when iterating buffered streams.
Custom tool calls are supported in ChatCompletionStream.
Custom tool calls are supported in the parser and ChatCompletionStream.
Azure preserves model-to-deployment mapping for images.edit.
Streamed Responses output text is kept linear and canonical.
Responses streams reject with OpenAIError when the stream emits an error event.
SSE parsing handles mixed line endings.
SSE streams finish immediately after [DONE].
toFile no longer throws a TypeError for Responses without a URL.
openai 6135 changes
Breaking changes 12
Promises emitted through EventEmitter are now rejected when an error occurs.
Incomplete structured output is no longer parsed.
The migrate CLI has been removed.
Removes web_search_call.results from ResponseIncludable.
Makes the type field required in ResponseInputMessageItem.
The detail field was removed from ResponseInputFile.
The detail field was removed from ResponseInputFileContent.
The GA ComputerTool now uses the CompuerTool class.
The computer_use_preview tool is moved to ComputerUsePreview.
Updates the Responses API parameter for prompt_cache_key.
The model parameter is now required for the responses/compact endpoint.
InputAudio is removed from ResponseInputContent.
Security 4
Replayed messages are now sanitized by runTools.
Adds validation for workload identity access tokens.
API-key headers are redacted in debug logs.
Tightens auth header selection.
Deprecations 1
Marks assistants as deprecated.
New APIs and options 72
Support was added for spend_limit admin APIs.
Helpers now support standard schemas.
A helper for Zod realtime functions was added.
Zod now supports schema definitions.
Adds an endpoint for managing API keys for a service account within an organization project.
Adds owner_project_access to APIKeyListParams.
Adds async event iterators for consuming events.
Adds fromReadableStream to ResponseStream.
Adds support for streaming file uploads.
API updates for gpt-5.6-sol; developers can use the updated model support.
Adds an afterCompletion hook to runTools.
Realtime now supports sideband connections using call_id.
Adds a helper for response input items.
Adds a helper to accumulate response streams.
Adds the chat completions moderation API.
Adds the responses moderation API.
Adds support for using Responses with Amazon Bedrock.
Responses now include an additional_tools item.
The responses compact method accepts the service_tier parameter.
Admin organization usage responses now include a quantity field.
Realtime translation is launched.
Adds support for Admin API Keys per endpoint.
Adds group_type and user metadata fields and updates types across admin resources.
Adds the OAuthErrorCode type for representing OAuth error codes.
Adds the prompt_cache_retention parameter to responses compact.
Responses now support results as an output option for web_search_call.
WebSocket clients support binary messages.
WebSocket clients support path parameters.
WebSockets are supported in the browser when using simple auth.
The underlying WebSocket type is exposed for use by developers.
Adds the phase field to Message in conversations.
The client adds support for short-lived tokens.
Adds a keys field to computer action types.
Adds stream() and async iterator support to WebSocket classes.
Added the 5.4 mini model slug.
Added the 5.4 nano model slug.
Adds in and nin filter types to ComparisonFilter, allowing developers to use these filters.
Adds the defer_loading field to NamespaceTool.
Batches can now use the /v1/videos endpoint.
Adds support for custom voices.
Sora API improvements add a character API.
Sora API improvements support higher resolution exports.
Sora API improvements add video edits.
Sora API improvements add video extensions.
Adds a new computer tool to the API.
Adds gpt-5.4 support to the API.
Adds the tool search tool to the API.
Adds phase to the API.
Added gpt-audio-1.5 to realtime.
Added gpt-realtime-1.5 to realtime.
WebSockets are now available for the Responses API.
Container API support was added for network_policy.
Container API support was added for skills.
Images are now supported in the batch API, allowing developers to include them in batch requests.
Adds API support for hosted shell.
Adds API support for skills.
Adds context_management support to the responses API.
Responses support image generation actions.
Adds the name field to ResponseFunctionCallArgumentsDoneEvent.
Adds a status field to shell_call_output.
Adds the completed_at prop to Response.
Adds support for gpt-image-1.5.
Dated slugs were added for sora-2.
Adds support for gpt-5.2 in the API.
Adds support for the gpt-5.1-codex-max model.
Adds the compact Responses API endpoint.
Adds API support for gpt-5.1.
Hybrid searching adds ranking options.
The Realtime API adds token_limits.
Adds support for zod 4 schemas.
Adds responses.input_tokens.count to the API, allowing developers to access the input token count.
The audio/transcriptions endpoint now supports gpt-4o-transcribe-diarize.
Behavior and default changes 6
The API now accepts None for prompt_cache_key.
The API now accepts None for safety_identifier.
Passes context to runTools callbacks.
Workload identity is now included in audit logs.
Messages can be queued while waiting for a connection.
WebSocket connections can automatically reconnect.
Fixes and other changes 40
Azure endpoints now have trailing slashes normalized.
Parsed tool callback arguments are now inferred.
Stream handling now accounts for audio completion markers.
Schema definition references are escaped before strict validation.
Schema types are preserved while references are escaped.
Header names are normalized before appending, fixing inconsistent header handling.
Handles Azure filter stream chunks.
Avoids deep Zod types in Deno.
Preserves readable stream deltas in Assistants.
Emits stream finalization errors.
Adds support for zod v4 mini schemas.
Array delta entries are placed by index instead of appended, preserving their intended positions.
The runner normalizes missing tool call IDs.
Sanitizes extracted definition references in the Zod integration.
Fully resolves extracted wrapper definitions in the Zod integration.
Optional bodies set to null are no longer serialized.
Restores output_text on streamed final responses.
Leading whitespace chunks no longer break the partial parser for structured outputs.
ActionSearch.query is now optional.
Treat text/plan with format: binary as a raw upload.
Improves guidance for undici dispatcher mismatches.
Types now allow runtime fetch options.
Image 2 is updated.
The size enum regression is fixed.
Fixes support for admin API key authentication.
InputFileContent has additional detail in its API definition.
Corrects the prompt_cache_retention enum value in chat/completions and responses.
Allows a single message to exceed the WebSocket queue size.
Aligns SDK response types with expanded item schemas.
Fixes the phase enum.
Prevents abort listeners from being removed too early.
Fixes a memory leak involving abort signals.
The client no longer parses responses with an empty content-length.
Updates the type for the find_in_page action.
Undoes a change to the web search Find action.
The grader input list was fixed, which may affect how developers provide grader inputs.
Corrects the API endpoint used by the code tool.
Returns the correct lines when TypeScript errors occur.
Aligns the TypeScript types for input items and output items.
The nullability of logprobs was fixed, clarifying its type for developers.