openai-python 3.15/3.16 and openai-node 7.18/7.19: Cache Prewarming, Webhook Management, connector_id Deprecation
Six OpenAI SDK releases in one day: prewarm cache warming, client.webhooks endpoint management, connector_id deprecated for post-September-1 models, WebSocket sessions in both languages. Every item traced to its PR.
The official OpenAI SDKs shipped six releases in a single day, 2026-09-18: openai-python v3.15.0 / v3.16.0 / v3.16.1 / v3.16.2 and openai-node v7.18.0 / v7.19.0. Where the previous batch (3.14.x / 7.16–7.17) was themed on reliability, this one is themed on features: a warming switch for the prompt cache, a management REST surface for webhook endpoints, a formal deprecation of the MCP tool's connector_id, and a session layer for WebSocket connections. This article walks each item back to its PR and type sources (all verified on 2026-09-19 via the GitHub API against release notes, PR diffs, and the v3.16.2 tag); example code comes from the official README and type definitions.
1. Release timeline
| Release | Published (UTC) | Theme |
|---|---|---|
| openai-node v7.18.0 | 2026-09-18T00:38 (release body dated 09-17) | agent session settings, audio-mini, WS sessions, prewarm |
| openai-python v3.15.0 | 2026-09-18T00:52 | same, plus compaction progress events and a chat-stream moderation fix |
| openai-python v3.16.0 | 2026-09-18T14:52 | webhook endpoint management, connector_id deprecation |
| openai-node v7.19.0 | 2026-09-18T19:27 | webhook endpoint management, connector_id deprecation |
| openai-python v3.16.1 | 2026-09-18T19:00 | stop loading unrelated API resources on first use |
| openai-python v3.16.2 | 2026-09-18T21:26 | parse_response memory-leak fix |
The rhythm is worth noting: python and node shipped nearly in pairs this time — the four features (agent session settings, audio-mini, WS sessions, prewarm) landed in python v3.15.0 and node v7.18.0, while webhook management and the connector_id deprecation landed in python v3.16.0 and node v7.19.0. The two packages still do not share a version scheme; the same feature landing in different versions per language is the norm.
2. Prompt-cache prewarming: prewarm
prompt_cache_options gains prewarm (boolean, default false). The official docstring reads: "Prepares the prompt cache without generating output. Defaults to false. When set to true, overrides the generate field to false."
The problem it solves: before a long session issues its real request, warm the stable prefixes — system prompt, tool definitions — into the cache so the real request hits it. The canonical pattern is the WebSocket warmup flow: send a generate: false response.create event to prepare state without model output, then send the real request — the official README calls this warmup; prewarm: true lives in prompt_cache_options, and per its docstring setting it true forces the generate field to false.
response = client.responses.create(
model="gpt-5.6-terra",
input=[
# long, stable system prompt and tool definitions
],
prompt_cache_options={
"mode": "implicit",
"ttl": "30m",
"prewarm": True,
},
)
Two existing constraints are unchanged: prompt_cache_options requires gpt-5.6 and later models, and ttl still only accepts 30m. The diagnostics surface (prompt_cache_diagnostics) can verify whether your post-warmup request actually hit the cache (covered in our earlier dedicated article).
3. Webhook endpoint management: client.webhooks
A new top-level resource, client.webhooks, with a full endpoint lifecycle:
| Operation | Endpoint / method | Notes |
|---|---|---|
| create | POST /webhook_endpoints | returns WebhookEndpointWithSecret (plaintext signing_secret) |
| retrieve | GET /webhook_endpoints/{id} | returns WebhookEndpoint; secret is a masked hint only |
| update | POST /webhook_endpoints/{id} | event_types / name / url editable |
| list | GET /webhook_endpoints | cursor pagination |
| delete | DELETE /webhook_endpoints/{id} | returns DeletedWebhookEndpoint |
| rotate_secret | POST /webhook_endpoints/{id}/rotate | keep_old_secret_active_for_24_hours keeps the old key live for a day |
| test | POST /webhook_endpoints/{id}/test | fires one test delivery per event_type, returns WebhookEndpointTestResult |
A subresource, client.webhooks.event_types.list(), fetches the available event types. The subscription enum has 18 values in seven families: batch.* (completed / failed / expired / cancelled), response.* (completed / failed / cancelled / incomplete), eval.run.* (succeeded / failed / canceled), fine_tuning.job.* (succeeded / failed / cancelled), realtime.call.incoming, video.* (completed / failed), safety.alert.created.
endpoint = client.webhooks.create(
event_types=["response.completed", "safety.alert.created"],
name="prod-responses",
url="https://example.com/hooks/openai",
)
save_secret_somewhere_safe(endpoint.signing_secret) # plaintext exactly once
One rule to remember about the key model: the signing_secret comes back in plaintext only at creation and rotation; every other read exposes only a masked signing_secret_hint. Also note the official comment on updated_at: tests and unchanged updates do not advance it — which makes it a reliable signal for whether an endpoint's configuration truly changed.
4. MCP connector_id deprecation: two migration paths
The connector_id field on MCP tools is now marked deprecated: true in the OpenAPI spec, with the official docstring reading: "This field is deprecated for models released after September 1, 2026. Use server_url to connect to a remote MCP server, or tunnel_id to connect through a Secure MCP Tunnel."
Three qualifiers to parse: first, what is deprecated is the connector_id style of service-connector direct connection, not MCP tools themselves; second, the cutoff is per model — models released after 2026-09-01, while models released before that date are outside the deprecation statement; third, there are two migration paths, server_url (your own remote MCP server) or tunnel_id (a Secure MCP Tunnel).
The Responses, beta, and Realtime MCP tool types (Mcp, RealtimeResponseCreateMcpTool, and others) are all annotated. If your code still uses connector_id against service connectors such as Dropbox or Gmail, and your model list may move to post-09-01 versions, migrate to server_url or tunnel_id before upgrading. The protocol-level MCP knowledge is unaffected — our MCP channel explainers still apply.
5. Managed Responses WebSocket sessions: lane routing and final-response collection
The old problem with a raw client.responses.connect(): when several responses run concurrently on one connection, events interleave, routing is hand-rolled stream_id bookkeeping, and finalization means guessing which event is terminal. This batch adds a session layer in both languages (officially, managed sessions) — same idea, different API names.
On python it is the openai.lib.responses_websocket module (requires the openai[realtime] extra):
from openai import AsyncOpenAI
from openai.lib.responses_websocket import AsyncResponsesWebSocketSession
async with AsyncOpenAI() as client:
async with client.responses.connect() as connection:
async with AsyncResponsesWebSocketSession(connection) as session:
lane = session.lane("conversation") # register a named lane
await lane.send({ # stream_id added automatically
"type": "response.create",
"model": "gpt-5.6-luna",
"input": "Say hello.",
})
response = await lane.get_final_response() # drains remaining events, returns terminal Response
(Adapted from the official README, with the model name swapped to this site's current family; the README also demonstrates six budgets via ResponsesWebSocketLimits(max_lanes=8, max_events_per_lane=128, ...).)
Key semantics, from the official README: lane.send adds the stream_id to a response.create and rejects conflicting routing metadata; get_final_response() consumes remaining events and returns the terminal Response (including failed / incomplete), and a repeated call returns the cached result until a newer response.created appears on that lane; unrouted, unknown, and connection-level events go to the default lane (session.default) — watch it when using named lanes; budget overflow raises ResponsesWebSocketBufferError and closes the owned connection (drop the connection rather than silently drop events); lane budgets persist until a physical reconnect. The README also documents warmup (generate=False), tool turns, forks, and compaction over WS.
On node it is ResponsesWebSocketSession from openai/lib/responses/responses-websocket-session: lane.create(request) to send, lane.receive({ signal }) for raw events, lane.finalResponse({ signal, maxResponseBytes }) for the terminal response; budgets are maxLanes / maxBufferedEvents / maxBufferedBytes, exhaustion fails and drains the largest backlog (bytes first, then event count), and nested API error events raise a WebSocketError carrying the original event.
6. The rest in brief
- Agent session model settings (python #3882 / node #2755):
client.beta.agents.sessions.update(id, agent={...}), hittingPOST /v1/agents/sessions/{id}. Three fields —model(string),reasoning.effort(enum none / minimal / low / medium / high / xhigh / max), andservice_tier(auto / default / flex / priority / fast). The docstring's scoping deserves emphasis: "Model settings for subsequent turns. Omitted fields stay unchanged." - Responses accepts audio models (python #3886 / node #2759): the Responses model union adds
gpt-audio-miniandgpt-audio-mini-2025-12-15; on the ChatModel enum,gpt-5.1-minimoves to the legacy tail. Note both audio models belong to the legacy audio family on this site's deprecation calendar (migration window 2027-01-20) — new choices do not change their lifecycle status. - python v3.15.0 catches up on compaction progress events (#3866):
ResponseCompactionCompactingEvent(beta variant with an optionalagent.agent_name), fieldstype/item_id/output_index/sequence_number, fully aligned with node v7.17.0 — closing the cross-package gap from our previous breakdown. - Two python fix releases: v3.16.1 avoids loading unrelated API resources on first use (#3898, shortening the startup path); v3.16.2 drops
TextFormatTparameterization inparse_responseto fix a memory leak (#3084 / #3088) — long-lived processes should go straight to v3.16.2. - Assorted fixes: python v3.15.0 preserves chat stream moderation results (#3864), clarifies incoming SIP call ID usage (#3885), and updates image request examples (#3889); node v7.18.0 validates WebSocket results and preserves header defaults (#2763).
7. Upgrade notes and common pitfalls
- Going straight from v3.14.x to v3.16.2, or from v7.16/v7.17 to v7.19.0, is fine — the two batches do not conflict.
- prewarm not taking effect: confirm the model is gpt-5.6 or later (a precondition of prompt_cache_options as a whole), confirm you are not also sending a generate: true WS event (prewarm overrides it), then verify hits with prompt_cache_diagnostics.
- Lost webhook signing_secret: there is no second plaintext read; rotate_secret resets it (match keep_old_secret_active_for_24_hours against your rollout window).
- connector_id calls failing or flagged: check your model against the deprecation cutoff (models released after 2026-09-01) and move to server_url or tunnel_id.
- WS session events that belong to no lane: that is the default lane's job (unrouted, unknown, connection-level); consume session.default when using named lanes.
- Faster startup after upgrade, but resource attribute errors: v3.16.1 made resources lazy; audit code that relied on implicit eager loading of client.resources (the official fix reads: avoid loading unrelated API resources on first use).
8. Next steps
- The Responses API Compaction Progress Event: response.compaction.compacting and compaction_trigger — the full breakdown of the event whose cross-package gap this article closes in section 6.
- openai-python 3.14.x and openai-node 7.16/7.17: Stream Error Normalization, WebSocket Backpressure, and SSE Fixes — the previous reliability batch; this batch's WS session layer builds on its backpressure work.
- openai-python 3.9/3.10 and openai-node 7.11/7.12: Prompt Cache Diagnostics, API Key Expiry, GPT Image 2.5 — the backstory of prompt_cache_diagnostics and prompt_cache_options, which you will want for verifying prewarm hits.
- gpt-6-astra appears in the OpenAI SDK: the new ChatModel ID and the Safety Alerts API — the system behind the safety.alert.created entry in the webhook event enum.
- Codex CLI 0.154.0 and SDK 0.154.0: Worktrees, ExternalMessage, and the ultra Reasoning Effort — the Codex-side September release explainer; see our latest article for CLI 0.155.x.
Key points
- prewarm (python v3.15.0 #3888 / node v7.18.0 #2761): prompt_cache_options.prewarm is a boolean, default false; the official docstring reads 'prepares the prompt cache without generating output'; setting it true forces the WS response.create generate field to false — prompt_cache_options still requires gpt-5.6 and later models
- Webhook endpoint management (python v3.16.0 #3892 / node v7.19.0 #2764): new top-level client.webhooks resource — create / retrieve / update / list (cursor pagination) / delete / rotate_secret (keep_old_secret_active_for_24_hours) / test, plus an event_types.list() subresource; 18 subscribable event types across seven families (batch, response, eval.run, fine_tuning.job, realtime.call.incoming, video, safety.alert.created); signing_secret comes back in plaintext only on create and rotate, otherwise just a masked signing_secret_hint
- connector_id deprecation (python v3.16.0 #3894 / node v7.19.0 #2767): the MCP tool connector_id is marked deprecated, per the official wording for models released after September 1, 2026; migration paths are server_url (remote MCP server) or tunnel_id (Secure MCP Tunnel); the Responses, beta, and Realtime MCP tool types are all annotated
- Managed Responses WebSocket sessions (python v3.15.0 #3887 / node v7.18.0 #2760): python's openai.lib.responses_websocket ResponsesWebSocketSession (lane.send / lane.recv / lane.get_final_response / lane.close with six ResponsesWebSocketLimits budgets) and node's openai/lib/responses/responses-websocket-session ResponsesWebSocketSession (lane.create / lane.receive / lane.finalResponse with maxLanes / maxBufferedEvents / maxBufferedBytes) — lane routing and final-response collection on top of the existing client.responses.connect(); the session owns the connection's read side and closing it closes the connection; overflow raises ResponsesWebSocketBufferError on python, fails and drains the largest backlog on node
- Agent session model settings (python v3.15.0 #3882 / node v7.18.0 #2755): client.beta.agents.sessions.update(id, agent={model, reasoning.effort, service_tier}) hits POST /v1/agents/sessions/{id} — per the docstring, model settings for subsequent turns; omitted fields stay unchanged; the effort enum is none / minimal / low / medium / high / xhigh / max
- The rest: the Responses model union adds gpt-audio-mini and gpt-audio-mini-2025-12-15 (#3886 / #2759); python v3.15.0 catches up on the compaction progress event ResponseCompactionCompactingEvent (#3866, aligning with node v7.17.0); python v3.16.1 stops loading unrelated API resources on first use and v3.16.2 drops TextFormatT parameterization in parse_response to fix a memory leak; node v7.18.0 validates WebSocket results and preserves header defaults (#2763)
Frequently asked questions
Official references
- Changelogopenai-python v3.15.0 Release Notes (GitHub — WS sessions, prewarm, agent session, audio-mini, compaction progress events)
- Changelogopenai-python v3.16.0 Release Notes (GitHub — webhook endpoint management and connector_id deprecation)
- Changelogopenai-node v7.18.0 Release Notes (GitHub — the node-side counterpart batch)
- Changelogopenai-node v7.19.0 Release Notes (GitHub — node webhook management and connector_id deprecation)
Related articles
OpenAI API 429 Rate Limit Errors: RateLimitError and SDK Retries Explained
A 429 is two problems in one status: throughput limits vs quota exhaustion. The Python SDK already retries twice and honors Retry-After — this guide explains the mechanics from source.
Read articleopenai-node v7.20.0 Explained: Environment-Variable Vault Credentials, External Storage, and Safety Cases
Six PRs in one openai-node release: environment_variable vault credentials, external storage management, safety case retrieval with two webhook events, a SIP media security field, and a legacy GET fix — each traced to PR and tag sources.
Read articleThe Responses API Compaction Progress Event: response.compaction.compacting and compaction_trigger
openai-node v7.17.0 adds a Responses API compaction progress event: response.compaction.compacting fires at most once every 30 seconds and carries no summary content. Set in context: trigger item, compact endpoint, context_management.
Read articleSubscribe to GPTMap Weekly
One email every Monday: curated OpenAI updates, deep dives, and best practices. No ads, unsubscribe anytime.
Submitting opens Buttondown in a new tab to confirm your subscription.