- Symptom
- Integer parsing error or type mismatch on credits_used from Retrieve a session or Query sessionstotal_credits_used from Retrieve agent insights does not equal the exact credit usageValue such as 0.45 or 12.45 where whole numbers were expected
- Cause
- Since October 30, 2026, credit fields report fractional credits and round down. credits_used has at most two decimals (12.456789 reads as 12.45). total_credits_used is a whole number from 1 up (12.7 reads as 12) and has at most two significant figures below 1 (0.456789 reads as 0.45).
- Fix
- Treat these fields as floating point numbers, not integers. Do not sum rounded values and expect exact totals.
- Apply
const credits: number = Number(session.credits_used); // allow decimals, do not use parseInt- Affected
- Notion Agent APIs from 2026-10-30
- Sources
Last verified 2026-11-13 · Confirmed by 0 builders