mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
A chain whose first provider reasoned without answering and whose second one answered billed only the answer: result.tokensUsed is the answering call's alone, and the failed hop's spend, already reported on its FallbackHop, was dropped by every caller that reconciles the day's ledger. The raw runners now report tokensSpent on success too, the sum the failed hops before the answer reported. The briefing, status, Coach (no-tools path and every tool-loop round) and medication-extract reconciles charge it on top of the answer. On failure, the Coach turn ledger's close keeps what the failed chain reported spending instead of refunding everything, and the medication-extract and document-chat routes charge it too, as the status and briefing paths already did. Document indexing resolves a single provider and already charged its failed call. Refs #1279