mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## What changed Add an optional `usage_url` to model provider configuration and carry it through remote thread configuration. Expose `read_provider_usage` to fetch the current user's monthly USD spend, optional cap and percentage used, and reset time. Use the provider's own credentials for the request. Reject redirects, disable interactive gateway login, and enforce same-origin validation for gateway OAuth configurations that require it. ## Testing Cover capped and uncapped spend, percentage rounding, and malformed responses. Verify usage URL validation and remote configuration round-tripping. GitOrigin-RevId: ed805a756aab6e55c24751f0285bfe73b9091f07