Skip to content

Preserve native USD amounts in thread usage responses - #50442

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/53891fc95807138e2eccb99d4cda1520b857dba4
Oct 2, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/53891fc95807138e2eccb99d4cda1520b857dba4

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Preserve native USD amounts in thread usage responses

What changed

Add optional native_usage_usd_micros fields to thread usage totals and breakdown groups, and carry backend values through the client alongside existing credit and USD estimates. Missing or null native amounts remain None, while explicit zero amounts remain Some(0).

Testing

Add coverage for native totals and group amounts, mixed batches with legacy responses, and the distinction between missing, null, and zero native group amounts.

## What changed

Add optional `native_usage_usd_micros` fields to thread usage totals and breakdown groups, and carry backend values through the client alongside existing credit and USD estimates. Missing or null native amounts remain `None`, while explicit zero amounts remain `Some(0)`.

## Testing

Add coverage for native totals and group amounts, mixed batches with legacy responses, and the distinction between missing, null, and zero native group amounts.

GitOrigin-RevId: 53891fc95807138e2eccb99d4cda1520b857dba4
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/53891fc95807138e2eccb99d4cda1520b857dba4 branch from da57d6d to 3629508 Compare October 2, 2026 22:21
@copyberry
copyberry Bot merged commit 3629508 into main Oct 2, 2026
1 check failed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/53891fc95807138e2eccb99d4cda1520b857dba4 branch October 2, 2026 22:21
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant