litellm/tests/test_litellm/llms/xai/responses
mateo-berri 1a1d459701 fix(xai): keep streamed and custom-priced billing inside the cost calculator
Restate xAI's usage.cost_in_usd_ticks as usage.cost on chat and responses
replies, streamed ones included, then let the cost calculator own the
figure: a deployment with its own input_cost_per_token and
output_cost_per_token keeps that price, cost margins apply on chat streams
as they already did on non-streamed calls, and only OpenRouter's usage
cost becomes the llm_provider-x-litellm-response-cost header, so xAI
streams no longer skip the calculator through the header or the
stream_chunk_builder hidden response_cost.
2026-09-02 16:13:31 -07:00
..
test_xai_responses_transformation.py fix(xai): keep streamed and custom-priced billing inside the cost calculator 2026-09-02 16:13:31 -07:00