# Corrected Marco and Gary Usage Methodology

Generated: 2026-07-01

The original report treated Claude SDK `total_cost_usd` as confirmed spend. That was wrong for OpenRouter reconciliation. The corrected report separates:

- SDK telemetry cost: `claude_agent.result.totalCostUsd` and `modelUsage[*].costUSD` from the Claude Agent SDK result message.
- Current OpenRouter price estimate: stored modelUsage token categories repriced against the current OpenRouter `/api/v1/models` pricing table.
- OpenRouter account truth: `/api/v1/credits` returned `total_usage = 26.950449146` for the configured key.

Exact per-user OpenRouter spend cannot be reconstructed from current persisted data because historical OpenRouter generation IDs and provider `usage.cost` values were not stored. OpenRouter analytics would be the correct per-user reconciliation source, but it requires a management key and the configured key returned 403 for analytics metadata.

Cache note: Cloudflare AI Gateway cache hits do not call OpenRouter. The gateway code also skips provider usage accounting on HIT. Cached SSE bodies can still contain prior usage metadata, so SDK `total_cost_usd` can overstate actual OpenRouter charges when cache hits are involved.
