Docs Guides
Guide

AI Response Fields: Thinking

Some reasoning / “thinking” models attach intermediate reasoning in the response. Field names differ by vendor — parse per the model docs; do not assume a single shape.

Some reasoning / “thinking” models attach intermediate reasoning in the response. Field names differ by vendor — parse per the model docs; do not assume a single shape.

Common shapes

1. OpenAI-compatible · reasoning_content / reasoning

Some compatible APIs add fields on choices[].message:

{ "choices": [ { "message": { "role": "assistant", "content": "Final answer…", "reasoning_content": "Intermediate reasoning…" } } ] }
json
  • End-user UI: usually show content only.
  • Debug / audit: you may log reasoning_content (watch privacy and log size).

2. Separate thinking / thought blocks

Some native protocols put thinking in a separate part or field. Follow the platform OpenAPI response schema.

3. Streaming (SSE)

Thinking and final text may arrive in different frames:

  1. reasoning / thinking deltas first
  2. then final content deltas
  3. end with data: [DONE] or the vendor’s terminal frame

Clients should accumulate by field, and avoid merging thinking into the final answer pane.

Billing and visibility

TopicNote
TokensThinking usually counts toward input or output tokens (per model/channel docs)
Empty thinkingSome models can disable thinking or return empty — missing fields should not crash the client
SafetyDo not expose full thinking logs to untrusted frontends

Integration tips

  1. Check response examples on the platform page in the portal.
  2. Collapse thinking in the UI by default; show content.
  3. If the field is absent, fall back to rendering content only.