litellm/litellm
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
..
a2a_protocol Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5 2026-08-29 06:03:33 -07:00
anthropic_interface chore(lint): strip inert type: ignore comments and zero LIT009, LIT010, LIT011 headroom 2026-08-05 02:37:24 -07:00
assistants chore(lint): clear grandfathered over-limit lint drift and ratchet budgets down 2026-08-05 12:18:13 -07:00
batch_completion feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
batches refactor(batches): make count_error_file_failed_requests public for the poller import 2026-08-29 14:09:18 -07:00
caching Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5 2026-08-29 06:03:33 -07:00
completion_extras fix(anthropic): carry tool_reference tool results through the guardrail translation round trip 2026-08-26 22:35:46 -07:00
compression chore(lint): strip inert type: ignore comments and zero LIT009, LIT010, LIT011 headroom 2026-08-05 02:37:24 -07:00
containers chore(typing): drop 1.3k basedpyright errors across 30 Any hotspot files 2026-08-16 03:56:02 +00:00
endpoints/speech/speech_to_completion_bridge fix(speech): keep proxy metadata and completion cost through the TTS completion bridge 2026-08-26 15:12:41 -07:00
evals chore(typing): remove 914 basedpyright Any errors across 16 hotspot files 2026-08-10 01:24:40 -07:00
experimental_mcp_client feat(mcp): let a resolved OAuth token target a custom upstream header (#38456) 2026-08-27 14:32:01 -07:00
files fix(batches): accept litellm_proxy in files and batches provider type literals 2026-08-18 13:28:06 -07:00
fine_tuning Merge branch 'litellm_internal_staging' into litellm_remove_types_ruff_exclusion 2026-08-05 11:05:33 -07:00
google_genai merge(litellm_internal_staging): resolve typing sweep overlap, keep best-of-both types 2026-08-29 06:48:36 -07:00
images Merge origin/litellm_internal_staging into litellm_fix_36493_image_video_routes 2026-08-24 11:58:22 -07:00
integrations fix(otel): emit cache token counts on OTel v2 LLM spans (#38716) 2026-08-31 13:59:59 -07:00
interactions feat(vertex_ai): add native Vertex AI Interactions API support 2026-08-25 09:55:13 -07:00
litellm_core_utils fix(xai): keep streamed and custom-priced billing inside the cost calculator 2026-09-02 16:13:31 -07:00
llms fix(xai): keep streamed and custom-priced billing inside the cost calculator 2026-09-02 16:13:31 -07:00
models Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5 2026-08-29 06:03:33 -07:00
ocr fix(ocr): reject invalid req_format values as 400 on the SDK path 2026-08-17 15:49:18 -07:00
passthrough fix(aws): build every AWS endpoint and ARN from the region partition 2026-08-29 01:21:59 -07:00
proxy Merge pull request #38997 from BerriAI/litellm_add_responses_input_tokens_endpoint 2026-08-31 14:30:44 -07:00
proxy_auth feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
rag Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5 2026-08-29 06:37:10 -07:00
realtime_api fix(health): probe Azure GA realtime path for transcription-only models 2026-08-26 12:14:52 -07:00
repositories Merge branch 'litellm_internal_staging' into litellm_decrease_anys_opus5 2026-08-29 21:41:04 -07:00
rerank_api fix(together_ai): default endpoints to api.together.ai instead of api.together.xyz 2026-08-25 10:18:55 -07:00
responses fix(responses): count input_file tokens instead of silently dropping the file 2026-08-31 13:17:43 -07:00
router_strategy merge(litellm_internal_staging): resolve typing sweep overlap, keep best-of-both types 2026-08-29 06:48:36 -07:00
router_utils fix(router): arm the provider-scoped fallback pin only on resource-operating handlers 2026-08-29 01:46:33 -07:00
rust_bridge Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5 2026-08-29 06:03:33 -07:00
sandbox feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
search chore(lint): strip inert type: ignore comments and zero LIT009, LIT010, LIT011 headroom 2026-08-05 02:37:24 -07:00
secret_managers Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5 2026-08-29 06:03:33 -07:00
skills chore(lint): strip inert type: ignore comments and zero LIT009, LIT010, LIT011 headroom 2026-08-05 02:37:24 -07:00
types feat(spend_tracking): persist router metadata in spend logs for internal router models (#39001) 2026-08-31 12:52:34 -07:00
vector_store_files chore(lint): clear grandfathered over-limit lint drift and ratchet budgets down 2026-08-05 12:18:13 -07:00
vector_stores refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
videos refactor(videos): make video upload param keyword-only on public edit fns 2026-08-24 15:55:07 -07:00
__init__.py fix(spend): remove the proxy-wide autorouter savings baseline override (#38700) 2026-08-28 14:53:27 -07:00
_internal_context.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
_lazy_imports.py Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5 2026-08-29 06:37:10 -07:00
_lazy_imports_registry.py fix(together_ai): route chat completions through a dedicated TogetherAIChatConfig 2026-08-25 11:44:06 -07:00
_logging.py fix(logging): stop stream-based log collectors classifying INFO logs as errors (#38476) 2026-08-27 17:42:00 -07:00
_redis.py refactor(redis): drop docstrings restating the code 2026-08-26 10:45:56 -07:00
_redis_credential_provider.py chore(lint): strip inert type: ignore comments and zero LIT009, LIT010, LIT011 headroom 2026-08-05 02:37:24 -07:00
_service_logger.py chore(lint): clear grandfathered over-limit lint drift and ratchet budgets down 2026-08-05 12:18:13 -07:00
_uuid.py chore(lint): strip inert type: ignore comments and zero LIT009, LIT010, LIT011 headroom 2026-08-05 02:37:24 -07:00
_version.py
anthropic_beta_headers_config.json
anthropic_beta_headers_manager.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
blog_posts.json
budget_manager.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
constants.py fix(proxy): deliver budget alerts on webhook-only alerting and accept ALERTING_WEBHOOK_URL (#38441) 2026-08-31 09:22:36 -07:00
cost.json
cost_calculator.py fix(xai): keep streamed and custom-priced billing inside the cost calculator 2026-09-02 16:13:31 -07:00
exceptions.py feat(proxy): redact or drop individual batch records instead of rejecting the file (#37561) 2026-08-20 13:12:55 -07:00
main.py fix(xai): keep streamed and custom-priced billing inside the cost calculator 2026-09-02 16:13:31 -07:00
model_prices_and_context_window_backup.json Merge pull request #38880 from Lee-Si-Yoon/friendli/glm-5.3-flash-v2 2026-08-31 15:07:06 -07:00
policy_templates_backup.json
provider_endpoints_support_backup.json feat(hosted_vllm): add vLLM-Omni videos API 2026-08-24 17:10:44 -04:00
py.typed
router.py fix(router): tier-pinned reasoning_effort supersedes client effort carriers (#38698) 2026-08-28 14:53:33 -07:00
scheduler.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
setup_wizard.py chore(lint): strip inert type: ignore comments and zero LIT009, LIT010, LIT011 headroom 2026-08-05 02:37:24 -07:00
timeout.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
utils.py Merge pull request #38740 from BerriAI/litellm_vertex_gemini_35_transcribe 2026-08-29 16:19:56 -07:00