mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
## Why When a turn incurs usage priced directly in USD, reporting only the credit-converted estimate understates its cost. ## What changed Sum `estimated_usage_usd_micros` and `native_usage_usd_micros` for settled turns. Default an omitted native USD field to zero for legacy responses. Suppress the total when either component is unavailable (including explicit null), either is negative, or their sum overflows. ## Testing Cover omitted and null native USD values, zero costs, negative amounts, and overflow in backend client tests. Verify that the combined amount reaches the OTLP exporter in the app-server integration test. GitOrigin-RevId: 8709e48329db813cd66baf270ee3f1bcfd87cb03