litellm/type-discipline-budget.json
mateo-berri 815fa0ff08 fix(anthropic_adapter): carry web search usage into /v1/messages cost breakdown
For non-Anthropic models served over /v1/messages, the outer wrapper recomputes
cost over the adapter-translated Anthropic response dict. That dict dropped every
web search usage signal, so the recompute overwrote the correct cost breakdown
with a token-only one: x-litellm-response-cost-tool-usage read 0.0 and
x-litellm-response-cost-original excluded the search cost, while the total kept it.

The adapter now maps web search request counts (from Usage.server_tool_use or
Gemini's prompt_tokens_details) into usage.server_tool_use.web_search_requests,
matching the Anthropic API shape, and the Gemini web search cost calculator falls
back to server_tool_use when prompt_tokens_details carries no count. The shared
get_web_search_requests helper is now public since five modules consume it.

Resolves LIT-6288
2026-08-26 18:14:10 -07:00

38 lines
437 B
JSON

{
"LIT001": {
"limit": 22733
},
"LIT002": {
"limit": 26863
},
"LIT003": {
"limit": 269
},
"LIT004": {
"limit": 43
},
"LIT005": {
"limit": 0
},
"LIT006": {
"limit": 1065
},
"LIT007": {
"limit": 0
},
"LIT008": {
"limit": 948
},
"LIT009": {
"limit": 0
},
"LIT010": {
"limit": 16616
},
"LIT011": {
"limit": 5583
},
"LIT012": {
"limit": 4510
}
}