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
contentonly. - 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:
- reasoning / thinking deltas first
- then final
contentdeltas - 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
| Topic | Note |
|---|---|
| Tokens | Thinking usually counts toward input or output tokens (per model/channel docs) |
| Empty thinking | Some models can disable thinking or return empty — missing fields should not crash the client |
| Safety | Do not expose full thinking logs to untrusted frontends |
Integration tips
- Check response examples on the platform page in the portal.
- Collapse thinking in the UI by default; show
content. - If the field is absent, fall back to rendering
contentonly.
