Repository navigation
fix(xai): bill web_search from server_side_tool_usage_details #30817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mateo-berri
merged 23 commits into
BerriAI:litellm_internal_staging
from
geraint0923:litellm_fix_xai_web_search_cost_billing
Aug 12, 2026
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
25ad7dc
fix(xai): bill web_search from server_side_tool_usage_details
geraint0923 6963cfe
style: apply black formatting to responses/utils.py
geraint0923 014d59f
refactor(responses): pass through extra usage fields generically
geraint0923 3aea951
refactor(xai): keep Responses tool usage pass-through in llms/xai
geraint0923 ea98d8e
fix(xai): read tool usage details from ResponseAPIUsage extras
geraint0923 8687d73
fix(xai): gate web search cost on server_side_tool_usage_details
geraint0923 7aaa935
fix(xai): read web_search per-call rate from model_info
geraint0923 ea49354
fix(xai): attach tool usage details on Responses stream terminal events
geraint0923 c03a607
test(xai): cover Responses tool usage attach helpers
geraint0923 478118a
test(xai): expand cost_calculator coverage for web search helpers
geraint0923 8ad0a57
style: drop unused pytest import in xAI responses tests
geraint0923 7410098
revert: remove xAI-specific web search gate from shared cost tracking
geraint0923 a9277b4
style: black format xAI cost calculator tests
geraint0923 749a8b0
fix(xai): keep chat Usage through Responses completions bridge
geraint0923 4a53609
style: ruff format xAI cost calculator and responses transform
geraint0923 21f7420
fix(xai): type tool usage details helpers without Any
geraint0923 da69b5b
fix(xai): satisfy type-discipline gate on web search billing
geraint0923 fc102b5
fix(xai): replace setattr with assignments for B010
geraint0923 1705f86
fix(responses): add int tokens before summing usage totals
geraint0923 52f9b4a
fix(xai): keep Responses API usage schema while billing web search
mateo-berri 280844c
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
mateo-berri 6bce073
fix(responses): keep chat-shaped usage extras from colliding in the b…
mateo-berri d96f76c
fix(cost-tracking): bill web searches reported only in server_side_to…
mateo-berri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.