v2
chat
chat

Change the connection an existing chat runs on

Move a chat onto another connection, from the next turn onward.

A chat is latched to the connection it started on so that a turn cannot silently change who pays for it halfway through. This is the deliberate exception: when a provider stops accepting turns -- a spent quota, an expired login -- the alternative to switching is the chat simply ending.

It never happens on its own. The caller is a button the user pressed, and the run continues on the connection they picked rather than on whichever one happens to work.

History is not rewritten. Turns already stamped keep the connection they ran on, so a chat that hit a limit and carried on elsewhere reads as exactly that.

put/api/chat/sessions/{session_id}/connection

Path parameters

session_idstring required

Request body

llm_auth_provider'platform' | 'codex' required
llm_credential_idstring nullable

Response

Successful Response

object required

Changes

Changed in 1 of the 103 revisions of this API.1