Thinking & Reasoning Tokens
Understand how hidden reasoning tokens work and why they must be billed accurately.
Thinking & Reasoning Tokens
Modern frontier models like OpenAI o1, o3-mini, GPT-5, and Claude 3.7 Thinking do internal "chain of thought" reasoning before writing their final answer.
The Hidden Token Problem Explained
Here is an example of what happens during a reasoning call: 1. You ask: *"Write a Python script to balance a binary tree."* 2. The AI thinks for 5 seconds, generating **3,500 internal reasoning tokens**. 3. The AI outputs **150 visible words** of Python code.
If your billing system only counts the 150 visible output words, you might charge your user **$0.0001**, but OpenAI charges you **$0.0154**! If you do this at scale, you will lose significant money.
How VibezCheck Solves It
`vibezcheck` automatically inspects provider chunk details, extracts hidden reasoning tokens, and calculates the exact combined cost:
{ 400 font-semibold">class="text-emerald-400">"usage": { 400 font-semibold">class="text-emerald-400">"inputTokens": 450, 400 font-semibold">class="text-emerald-400">"outputTokens": 2800, 400 font-semibold">class="text-emerald-400">"totalTokens": 3250, 400 font-semibold">class="text-emerald-400">"reasoningTokens": 2500, 400 font-semibold">class="text-emerald-400">"visibleOutputTokens": 300 }, 400 font-semibold">class="text-emerald-400">"cost": { 400 font-semibold">class="text-emerald-400">"inputUSD": 0.000495, 400 font-semibold">class="text-emerald-400">"outputUSD": 0.012320, 400 font-semibold">class="text-emerald-400">"reasoningCostUSD": 0.011000, 400 font-semibold">class="text-emerald-400">"totalUSD": 0.012815 }}Supported Reasoning Models
- **OpenAI**: `o1`, `o1-mini`, `o3`, `o3-mini`, `gpt-5.6-sol`
- **Anthropic**: `claude-3-7-sonnet` (with Extended Thinking)
- **DeepSeek**: `deepseek-reasoner` (DeepSeek R1)
- **Google**: `gemini-2.0-flash` (Thinking)