mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
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. |
||
|---|---|---|
| .. | ||
| responses | ||
| xai_responses | ||
| test_xai_chat_transformation.py | ||
| test_xai_cost_calculator.py | ||
| test_xai_key_fallback.py | ||
| test_xai_model_registry.py | ||
| test_xai_oauth.py | ||
| test_xai_redirected_slug_pricing.py | ||