litellm/tests/test_litellm/llms/xai
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
..
responses fix(xai): keep streamed and custom-priced billing inside the cost calculator 2026-09-02 16:13:31 -07:00
xai_responses test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_xai_chat_transformation.py fix(xai): bill from the cost xAI reports instead of recomputing it 2026-09-01 07:09:54 +09:00
test_xai_cost_calculator.py fix(xai): keep streamed and custom-priced billing inside the cost calculator 2026-09-02 16:13:31 -07:00
test_xai_key_fallback.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_xai_model_registry.py fix(model_prices): absorb Databricks/Z.AI and xAI registry PRs, add Together and Azure deprecation dates 2026-08-27 13:16:12 +00:00
test_xai_oauth.py test(lint): ban blind pytest.raises(Exception) with ruff B017 (#37731) 2026-08-20 18:09:42 -07:00
test_xai_redirected_slug_pricing.py fix(registry): correct xai retired slug pricing, bedrock grok caching, and unsourced entries 2026-08-29 13:24:09 -07:00