Skip to main content
By default, a model’s reply is delivered as a single complete message at the end of each turn. With streaming output enabled, the SDK pushes fine-grained incremental chunks as the model generates them — useful for typewriter effects, or for rendering reasoning and tool-invocation progress separately.

Enable

Set includePartialMessages: true in options:

Typewriter effect

The model’s text reply arrives as a sequence of incremental chunks; printing each chunk as it lands gives a typewriter effect:

Reasoning

Reasoning-capable models emit “thinking” chunks before their final reply:

Tool invocation arguments

Tool-call arguments are also generated incrementally — for example, you can use this to render the file content the model is writing in real time:
For the full event structure, see SDK References.