Next Turn Params
Use next_turn values to preserve hidden context and tool state.
Continuation Example
TypeScript
const first = await client.callModel({ model, input });
const second = await client.callModel({
...first.next_turn,
input: [{ role: "user", content: "Continue with rollout risks." }],
});next_turn Fields
| Name | Type | Required | Description |
|---|---|---|---|
conversation_id | string | Required | Server-side conversation state key. |
cursor | string | Required | Position marker for incremental context. |
tools_state | object | Serialized tool interaction state. |
Patch Input Only
next-turn-safe.ts
const next = {
...result.next_turn,
input: [{ role: "user", content: userMessage }],
};Server authority
Treat next-turn payloads as authoritative state snapshots generated by TheRouter.ai.