litellm/tests/e2e
Yassin Kortam e238e89537
test(e2e): spendlog cost for streaming /v1/messages via responses bridge (#33753)
Add a live spend-tracking e2e that drives a streaming anthropic-format
/v1/messages request through litellm's anthropic-messages -> OpenAI Responses
adapter and asserts the consumed stream writes exactly one SpendLogs row with
nonzero cost and token counts, attributed to the calling key under
custom_llm_provider openai and the /v1/messages call_type.

The deployment is a Responses-only OpenAI model (gpt-5.3-codex), so a served,
costed row proves the Responses path was taken; the chat-completions bridge
would have failed at OpenAI on an endpoint the model does not expose. Adds a
streaming /v1/messages method to the shared Gateway and the suite client, the
model to the inline compose config and driver-model registration, a coverage
registry row (quota_management.spend_tracking.messages_bridge.logs_cost), and
the matching variant vocab entry. The _summarize spend-row detail also gains
call_type and custom_llm_provider so a failed assertion prints the fields it
asserts on.

Resolves LIT-4546
2026-07-18 14:12:26 -07:00
..
access_control test(e2e): rename Gateway to ProxyClient and expose it as a session-scoped fixture (#33750) 2026-07-18 18:41:18 +00:00
batches test(e2e): harden stage flakes for batches, UI, and MCP (#33831) 2026-07-18 19:11:54 +00:00
claude_code refactor(e2e): fold claude_code HTTP probes onto shared Gateway methods (#33760) 2026-07-18 19:03:01 +00:00
coverage_registry test(e2e): spendlog cost for streaming /v1/messages via responses bridge (#33753) 2026-07-18 14:12:26 -07:00
llm_translation test(e2e): cover /v1/responses OpenAI vision and Anthropic basic (#33838) 2026-07-18 14:00:43 -07:00
load fix(e2e): migrate load suite from e2e_gateway to ProxyClient (#33839) 2026-07-18 19:41:03 +00:00
logging test(e2e): rename Gateway to ProxyClient and expose it as a session-scoped fixture (#33750) 2026-07-18 18:41:18 +00:00
management test(e2e): harden stage flakes for batches, UI, and MCP (#33831) 2026-07-18 19:11:54 +00:00
mcp test(e2e): harden stage flakes for batches, UI, and MCP (#33831) 2026-07-18 19:11:54 +00:00
quota_management test(e2e): spendlog cost for streaming /v1/messages via responses bridge (#33753) 2026-07-18 14:12:26 -07:00
router test(e2e): rename Gateway to ProxyClient and expose it as a session-scoped fixture (#33750) 2026-07-18 18:41:18 +00:00
CLAUDE.md test(e2e): spendlog cost for streaming /v1/messages via responses bridge (#33753) 2026-07-18 14:12:26 -07:00
conftest.py test(e2e): add Locust throughput load test that runs last (#33748) 2026-07-18 11:57:41 -07:00
CONTRIBUTING.md chore(e2e): remove tests/e2e/docker-compose.yml (#33837) 2026-07-18 12:50:23 -07:00
e2e_config.py test(e2e): harden stage flakes for batches, UI, and MCP (#33831) 2026-07-18 19:11:54 +00:00
e2e_http.py test(e2e): cover /v1/responses openai basic nonstream and stream (#33830) 2026-07-18 13:25:19 -07:00
junit_properties.py refactor(e2e): replace bespoke result reporter with standard JUnit report (#33758) 2026-07-17 20:53:22 +00:00
lifecycle.py test(e2e): rename Gateway to ProxyClient and expose it as a session-scoped fixture (#33750) 2026-07-18 18:41:18 +00:00
models.py refactor(e2e): fold claude_code HTTP probes onto shared Gateway methods (#33760) 2026-07-18 19:03:01 +00:00
proxy_client.py test(e2e): spendlog cost for streaming /v1/messages via responses bridge (#33753) 2026-07-18 14:12:26 -07:00
pytest.ini test(e2e): add Locust throughput load test that runs last (#33748) 2026-07-18 11:57:41 -07:00
transport.py test(e2e): probe the full spend read surface including schema-hidden routes (#32267) 2026-07-06 14:02:05 -07:00