litellm/tests/unit/responses/mcp
Mateo Wang daa133da5c
fix(mcp)!: bill both model calls of a chat completions MCP auto-execute on one spend row (#47422)
* test(mcp): cover one spend row billing both rounds of a chat completions MCP auto-execute

* fix(mcp): bill both model calls of a chat completions MCP auto-execute on one spend row

* fix(mcp): keep provider usage fields when summing both chat rounds of an MCP auto-execute

* fix(mcp): log each auto-executed MCP tool call under its own spend-log id

A chat MCP auto-execute logged its tool calls under the request's call id, which is also the id of the request's failure row. When the follow-up call failed, the database kept the tool row and dropped the failure row that bills the paid first call

* test(mcp): cover the margin, cache, failure row and parallel tool rows of MCP auto-execute billing
2026-10-20 04:37:31 +00:00
..
__init__.py ci: move provider-independent MCP tests into tests/unit and run mcp-integration from litellm-tests (#42904) 2026-09-24 23:07:48 +00:00
conftest.py perf(ci): isolate and shard integration suites (#44146) 2026-10-10 11:15:19 -07:00
test_aresponses_api_with_mcp.py fix(responses): log and bill every round of non-stream MCP auto-execute (#43667) 2026-10-16 17:37:33 +00:00
test_chat_completions_handler.py fix(mcp)!: bill both model calls of a chat completions MCP auto-execute on one spend row (#47422) 2026-10-20 04:37:31 +00:00
test_litellm_proxy_mcp_handler.py fix(mcp)!: bill both model calls of a chat completions MCP auto-execute on one spend row (#47422) 2026-10-20 04:37:31 +00:00
test_mcp_streaming_iterator.py fix(responses): open faked stream items empty so tool arguments and text arrive once (#46533) 2026-10-15 09:35:12 -07:00
test_round_billing.py fix(mcp)!: bill both model calls of a chat completions MCP auto-execute on one spend row (#47422) 2026-10-20 04:37:31 +00:00
test_tool_precheck.py fix(sdk): decide MCP gateway routing without importing the proxy handler (#45961) 2026-10-20 01:44:54 +00:00