Messages API responses include usage.output_tokens_details.thinking_tokens, which tells you how many of the billed output tokens were thinking tokens. You can see what thinking costs on real traffic and tune your budget from that.
When you stream, the breakdown arrives only on the final message_delta event.

