Normalize token usage once at the provider boundary
log_token_usage() had three format-detection branches that re-normalized
usage dicts already normalized by providers. The "OpenAI format" branch
matched Google's normalized output (both use input_tokens) but only
looked for reasoning_tokens inside OpenAI's nested details structure,
silently dropping the top-level reasoning_tokens that Google set. This
hid ~23K thinking tokens from Gemini extraction calls in the token log.
Replace the multi-branch normalizer with a single passthrough of known
keys defined by USAGE_KEYS in shared.py. Providers are now the sole
normalization point — log_token_usage trusts their output.
Also enrich provider extraction:
- OpenAI: capture reasoning_tokens and cached_tokens from SDK details
- Anthropic CLI: capture cache tokens (SDK path already did)
- Gemini CLI: derive reasoning_tokens from total - input - output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>