anthropic-sdk-python
anthropic-sdk-python copied to clipboard
[Feature] Better thinking usage information
Describe the feature
It would be very useful to have more details on the usage if the thinking is enabled. For now, we have no clue how many tokens have been used in the thinking part of the answer.
Use Case
This feature is useful for us in order to measure how much of a budget goes to the thinking part in order to better estimate the ratio cost / thinking budget.
Proposed Solution
Like the OpenAI and Gemini APIs, having a thinking_tokens attribute in the usage object of the response body that will correspond to the number of token used for generating the "thinking" part of the response.
SDK version used
0.64.0
Environment details (OS name and version, etc.)
Ubuntu 25.04
+1