litellm/tests/e2e/quota_management/spend_tracking
devin-ai-integration[bot] 57bead9842
test(e2e): pin end-user and tag attribution from Codex-style headers on /v1/responses (#43093)
* test(e2e): pin end-user and tag attribution from Codex-style headers on /v1/responses

Codex CLI has no body field for the end user, so its config.toml
http_headers attach x-litellm-customer-id or x-litellm-end-user-id plus
x-litellm-tags to every /v1/responses call. The proxy already honors
those headers on the Responses route, but nothing in the e2e stack
pinned it. The new case sends that exact wire shape with each standard
customer header and fails unless the spend row carries the end user,
the tags, the aresponses call type, and a nonzero cost.

* test(e2e): assert the customer's /customer/info total matches the header-attributed Responses row

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-09-24 18:33:49 -07:00
..
conftest.py test(e2e): every spend row a virtual key writes joins its token across all write paths 2026-09-09 14:34:12 -07:00
cost_rows.py test(e2e): pin prompt-cache, service-tier, and cost-header billing 2026-08-20 01:50:01 -07:00
spend_e2e_client.py test(e2e): pin end-user and tag attribution from Codex-style headers on /v1/responses (#43093) 2026-09-24 18:33:49 -07:00
spend_reconciliation.py test(spend): preserve multi-day coverage and immutable assertions 2026-09-14 22:26:20 -07:00
SPEND_TRACKING_COVERAGE_MATRIX.md test(e2e): pin end-user and tag attribution from Codex-style headers on /v1/responses (#43093) 2026-09-24 18:33:49 -07:00
test_cache_cost_accounting_e2e.py test(e2e): request reasoning explicitly on the reasoning-cost assertions 2026-08-20 04:11:08 -07:00
test_cost_headers_e2e.py fix(e2e): only the negative fallback assertion needs every replica to agree 2026-08-26 18:57:38 -07:00
test_key_attribution_e2e.py test(e2e): register the poller batch cost join as its own uncovered cell 2026-09-09 16:23:45 -07:00
test_provider_edge_spend_e2e.py ci(e2e): record the e2e suite weekly and replay it on weekdays with zero egress (#38163) 2026-08-24 23:49:03 -04:00
test_service_tier_pricing_e2e.py test(e2e): request reasoning explicitly on the reasoning-cost assertions 2026-08-20 04:11:08 -07:00
test_spend_routes.py fix(proxy): wait for the spend-log table before creating startup views 2026-09-19 08:36:22 -07:00
test_spend_surface_consistency_e2e.py test(e2e): one request lands the same spend on every surface (#42540) 2026-09-22 13:42:00 -07:00
test_spend_tracking_e2e.py test(e2e): pin end-user and tag attribution from Codex-style headers on /v1/responses (#43093) 2026-09-24 18:33:49 -07:00
test_team_daily_activity_e2e.py test(spend): preserve multi-day coverage and immutable assertions 2026-09-14 22:26:20 -07:00
test_websearch_interception_session_e2e.py fix(websearch_interception): keep intercepted searches under the parent request's session and trace (#41711) 2026-09-22 12:35:27 -07:00