You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0ba0541
Browse filesBrowse the repository at this point in the historyBrowse files
docs: merge version skew protection into the atomic deployments page
Version skew protection and atomic deployments now share one docs page. `/deployment/version-skew-protection` redirects to `/deployment/atomic-deployment`, which explains version skew protection first, states the release it is available from (v4.5.12), and adds a sequence diagram of a run waiting for its matching deployment. A closing section describes the legacy Vercel atomic deployments, marks them as deprecated and not advised, and lists the migration steps.
Mono-RevId: ac02e72b5bb0f0f21a233bf58050db017e91bfc0
| `triggerConfig.lockToVersion` | `string` | Pin every run to a specific worker version. |
215
-
| `triggerConfig.externalDeploymentId` | `string \| null` | Pin every run to the deployment carrying this [external deployment id](/deployment/version-skew-protection#chat-sessions). Discovered from the environment when omitted; `null` opts the chat out. |
215
+
| `triggerConfig.externalDeploymentId` | `string \| null` | Pin every run to the deployment carrying this [external deployment id](/deployment/atomic-deployment#chat-sessions). Discovered from the environment when omitted; `null` opts the chat out. |
216
216
| `triggerConfig.region` | `string` | Region preference. |
217
217
| `triggerConfig.idleTimeoutInSeconds` | `number` | Surfaced to the agent through the wire payload (1–3600). |
Copy file name to clipboardExpand all lines: docs/ai-chat/fast-starts.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -745,7 +745,7 @@ chat.startHeadStart<TTools>({
745
745
746
746
`completion` resolves once the head start finishes; `await` it or hand it to `waitUntil`. It rejects if the warm step or the dispatch fails.
747
747
748
-
`pendingVersion` is `true` when the agent run is parked waiting for the deployment carrying the session's [external deployment id](/deployment/version-skew-protection#chat-sessions). Step 1 still runs in your process and still reaches the browser, so pass the flag to the destination page if you want it to say a deploy is in progress rather than appear to stall on step 2.
748
+
`pendingVersion` is `true` when the agent run is parked waiting for the deployment carrying the session's [external deployment id](/deployment/atomic-deployment#chat-sessions). Step 1 still runs in your process and still reaches the browser, so pass the flag to the destination page if you want it to say a deploy is in progress rather than appear to stall on step 2.
Copy file name to clipboardExpand all lines: docs/ai-chat/patterns/version-upgrades.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Chat agent runs are pinned to the worker version they started on. When you deplo
10
10
11
11
<Note>
12
12
If your sessions are pinned by [version skew
13
-
protection](/deployment/version-skew-protection#chat-sessions), you do not need this page to move a
13
+
protection](/deployment/atomic-deployment#chat-sessions), you do not need this page to move a
14
14
conversation onto a new deployment. A pinned session follows its pin on its own: when the stored
15
15
`externalDeploymentId` stops naming the deployment a run is on, the agent hands over at the next
16
16
turn boundary. Set [`versionSkew: "hold"`](#staying-put) to turn that off for one agent.
@@ -32,7 +32,7 @@ The new run lives on the **same Session** as the old one. `chatId` is the durabl
32
32
33
33
### What "the latest deployment" means
34
34
35
-
The handoff clears the session's [external deployment id](/deployment/version-skew-protection#chat-sessions) so the new run can land on the current version — re-applying the pin the agent just rejected would make the upgrade impossible. The cleared pin is persisted on the session, so the next continuation doesn't fall back to it either.
35
+
The handoff clears the session's [external deployment id](/deployment/atomic-deployment#chat-sessions) so the new run can land on the current version — re-applying the pin the agent just rejected would make the upgrade impossible. The cleared pin is persisted on the session, so the next continuation doesn't fall back to it either.
36
36
37
37
To move to a specific deployment rather than to whatever is current, name it:
38
38
@@ -220,7 +220,7 @@ Two cases never hand over automatically, whatever `versionSkew` says:
220
220
turn boundary — never mid-turn. If the pin names a deployment that hasn't landed yet, the successor
221
221
parks: your messages stay durable, and the transport emits `run-pending-version` with
222
222
`source: "upgrade"` so you can say so in the UI. See [parked
Copy file name to clipboardExpand all lines: docs/ai-chat/reference.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -698,7 +698,7 @@ The `onEvent` callback receives a `ChatTransportEvent` (exported from `@trigger.
698
698
| --- | --- | --- |
699
699
|`message-sent`|`messageId?`, `source`, `durationMs`, `partId?`, `bodyBytes?`| A send was durably acknowledged — a 2xx from the session input stream append (or the `headStart` POST), after any internal token-refresh retries. This means the message is durably written to the stream the agent consumes from, not merely "request accepted". `partId` is the append's idempotency key, also stored on the server-side record. |
700
700
|`message-send-failed`|`messageId?`, `source`, `error`, `status?`, `durationMs`, `partId?`, `bodyBytes?`| A send definitively failed after internal retries. Fires in addition to `useChat`'s `onError`. |
701
-
|`run-pending-version`|`source`| The chat's run is parked waiting for the deployment carrying its external deployment id ([version skew protection](/deployment/version-skew-protection#chat-sessions)). Everything already sent is durable and answered once the deployment lands. `source` is `"start"` (learned while starting the session), `"send"` (from a message append, re-emitted on every send while parked) `"head-start"` (from the `headStart` POST, where step 1 still streams from your server and only step 2 waits) or `"upgrade"` (an automatic version handover whose successor is parked on a deployment that has not landed). |
701
+
|`run-pending-version`|`source`| The chat's run is parked waiting for the deployment carrying its external deployment id ([version skew protection](/deployment/atomic-deployment#chat-sessions)). Everything already sent is durable and answered once the deployment lands. `source` is `"start"` (learned while starting the session), `"send"` (from a message append, re-emitted on every send while parked) `"head-start"` (from the `headStart` POST, where step 1 still streams from your server and only step 2 waits) or `"upgrade"` (an automatic version handover whose successor is parked on a deployment that has not landed). |
702
702
|`stream-connected`|`resumed`, `lastEventId?`, `messageId?`| The SSE subscription to the session's output stream started delivering. `resumed: true` when reconnecting from a stored cursor (page reload) rather than following a fresh send. `lastEventId` is the cursor it connected from. |
703
703
|`first-chunk`|`chunkType?`, `lastEventId?`, `messageId?`, `sinceSendMs?`| The first response chunk of a turn arrived. `sinceSendMs` is the delta from the last turn-producing send — time to first token without any bookkeeping. |
704
704
|`turn-completed`|`lastEventId?`, `sessionInEventId?`, `messageId?`, `sinceSendMs?`| The agent's turn-complete control record arrived — the "finished answering" signal. `sinceSendMs` is the full turn latency; `sessionInEventId` is the cursor the agent can safely resume its input stream from. Treat it as a lower bound: it is held back behind any message still waiting to be handled, so it can be below the sequence of the record this turn answered. Do not use it to decide whether a turn boundary belongs to your own send. |
|`externalId`|`string?`| Your stable identity. Cannot start with `session_` (reserved). |
113
113
|`taskIdentifier`|`string`| Task this session triggers runs against. |
114
-
|`triggerConfig`|`SessionTriggerConfig`| Trigger options applied to every run: `tags` (up to 10, same as [run tags](/tags); the chat helpers such as `chat.createStartSessionAction` and `AgentChat` add a `chat:{chatId}` tag themselves, which uses one slot. Direct `sessions.start` callers get all 10 and must add any chat tag themselves), `queue`, `machine`, `maxAttempts`, `maxDuration`, `region`, `idleTimeoutInSeconds`, `basePayload`, and the version pins `lockToVersion` / [`externalDeploymentId`](/deployment/version-skew-protection#chat-sessions). |
114
+
|`triggerConfig`|`SessionTriggerConfig`| Trigger options applied to every run: `tags` (up to 10, same as [run tags](/tags); the chat helpers such as `chat.createStartSessionAction` and `AgentChat` add a `chat:{chatId}` tag themselves, which uses one slot. Direct `sessions.start` callers get all 10 and must add any chat tag themselves), `queue`, `machine`, `maxAttempts`, `maxDuration`, `region`, `idleTimeoutInSeconds`, `basePayload`, and the version pins `lockToVersion` / [`externalDeploymentId`](/deployment/atomic-deployment#chat-sessions). |
115
115
|`tags`|`string[]?`| Up to 10 tags on the Session row (separate from `triggerConfig.tags`). |
0 commit comments