Skip to main content
Use streamText when you want partial tokens as they arrive.

Streaming with messages

Production tips

  • Prefer streaming for long responses and interactive UIs.
  • Handle cancellation/timeout in your runtime for abandoned streams.
  • Keep model IDs fresh via /v1/models to avoid stale aliases.
Last modified on July 26, 2026