litellm/tests/integration/spend
devin-ai-integration[bot] 7a29648945
test(spend): include cache and margin fields in daily activity expectations (#52897)
Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-21 23:56:40 +00:00
..
fixtures test(spend): include cache and customer margin fields in repository goldens (#52944) 2026-11-19 21:29:06 +00:00
golden test(spend): include cache and margin fields in daily activity expectations (#52897) 2026-11-21 23:56:40 +00:00
__init__.py
_background_responses.py
_daily_activity_fixtures.py feat(usage-export): include key and user metadata objects in daily activity export rows (#49360) 2026-11-20 03:58:01 +00:00
_partial_stream.py
test_agent_spend.py
test_app_customer_budgets.py feat(proxy): add app groups with shared budgets and usage (#53232) 2026-11-21 12:50:58 -08:00
test_autorouter_session_rollup.py
test_background_interaction_settlement.py
test_background_response_billed_once.py
test_background_response_billing_proxies.py
test_background_response_poll_retirement.py
test_baggage_tag_mappings.py test(spend): align queued baggage mapping fixtures (#51847) 2026-11-14 19:13:36 +00:00
test_baseline_accounting.py test(integration): fix the baseline accounting and series cap flakes (#51096) 2026-11-11 12:36:02 -08:00
test_batch_completion_accounting.py
test_batch_enqueued_tokens_redis_lua.py
test_batch_observability.py
test_batch_poll_starvation.py
test_budget_limit_envelopes.py
test_cache_activity.py
test_cache_and_quota.py
test_chaos_burst_spend_once.py
test_chatgpt_subscription_usage.py
test_container_spend.py
test_customer_spend_by_team.py feat(usage): split customer spend by the key's current team (#50764) 2026-11-09 19:35:31 -08:00
test_daily_activity_aggregated_breakdowns.py
test_daily_activity_key_alias_probes.py
test_daily_activity_key_metadata_query_timeout.py
test_daily_activity_key_owner.py test(usage): assert per-user entity spend and metadata (#50251) 2026-11-05 20:16:40 +00:00
test_daily_activity_key_owner_faults.py test(usage): assert per-user entity spend and metadata (#50251) 2026-11-05 20:16:40 +00:00
test_daily_activity_key_owner_traffic.py
test_daily_activity_repository.py feat(usage-export): include key and user metadata objects in daily activity export rows (#49360) 2026-11-20 03:58:01 +00:00
test_daily_activity_routes.py test(spend): include cache and margin fields in daily activity expectations (#52897) 2026-11-21 23:56:40 +00:00
test_daily_rollup_retry.py test(spend): include cache and margin fields in daily activity expectations (#52897) 2026-11-21 23:56:40 +00:00
test_daily_tag_spend_retention.py
test_disable_end_user_cost_tracking.py
test_disconnected_bedrock_messages_stream_billing.py
test_end_user_budget_enforcement.py fix(anthropic_endpoints)!: return Anthropic error envelopes on /v1/messages auth failures (#48466) 2026-11-03 01:53:29 +00:00
test_end_user_spend_without_proxy_user.py fix(anthropic_endpoints)!: return Anthropic error envelopes on /v1/messages auth failures (#48466) 2026-11-03 01:53:29 +00:00
test_expired_ui_session_failure_rows.py
test_fail_closed_team_member_budget.py fix(proxy): fail-closed budget enforcement returns 403 naming /team/member_add for a team user with no membership row (#50603) 2026-11-09 15:38:59 -08:00
test_failed_dispatch_tokens.py
test_failing_request_stored_snapshot.py test(e2e): retire the quiet_stack lock and batch the claude_code model registration (#49984) 2026-11-04 09:55:53 -08:00
test_failure_spend_live_counters_chaos.py
test_filtered_ledger.py
test_gemini_tts_speech_billing.py
test_generate_content_endpoint_attribution.py fix(proxy): count generateContent spend under its own endpoint (#52701) 2026-11-18 16:50:56 -08:00
test_global_proxy_spend_counter.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_global_spend_report.py
test_global_spend_reset.py test(spend): snapshot logs after the denied request is recorded (#52422) 2026-11-18 03:14:35 +00:00
test_google_genai_native_spend.py
test_image_generation_key_spend.py
test_key_budget_alerts.py feat(ui): set per-threshold budget alert recipients on virtual keys (#51061) 2026-11-12 15:39:44 -08:00
test_key_budget_lockout.py
test_key_metadata_recovery_dropped_connection.py test(spend): compare FOCUS RequesterDetails alias exactly after dropped-connection recovery (#52198) 2026-11-17 19:20:09 +00:00
test_key_metadata_recovery_probe_bounds.py
test_key_reads_own_spend_logs.py fix(proxy): org admin spend log scope and gemini file id parsing (#52943) 2026-11-19 22:08:27 +00:00
test_legacy_spend_logs_row_cap.py
test_messages_stream_usage_cost.py feat(proxy): per-request header opts a stream into usage.cost without the global include_cost_in_streaming_usage flag (#50574) 2026-11-07 16:57:20 -08:00
test_model_router_selected_model.py
test_non_finite_cost_spend_writes.py
test_normalized_error_long_message.py test(integration): give each kill-burst its own prompts so cached control replies cannot stand in for late traffic (#50569) 2026-11-07 23:08:23 +00:00
test_openrouter_upstream_provider.py
test_org_budget_cli_session_token.py
test_partial_stream_live_budget.py test(spend): assert Anthropic envelope for Messages budget refusals (#49800) 2026-11-03 06:10:08 +00:00
test_passthrough_budget_reservation.py
test_passthrough_failure.py fix(proxy): write SpendLogs failure rows for config-defined pass-through endpoints (#41831) 2026-11-09 17:05:10 -08:00
test_passthrough_request_tags.py test(spend): expect model hub defaults on pass-through endpoints (#51505) 2026-11-16 19:51:07 +00:00
test_passthrough_stream_pricing_paths_spend.py fix(proxy): bill an OpenAI pass-through background response once across repeated reads (#50841) 2026-11-10 07:33:25 -08:00
test_passthrough_upstream_model.py
test_project_batch_enqueued_token_limit.py feat(proxy): add per-model project batch enqueued token limits (#51608) 2026-11-14 14:36:53 -05:00
test_prompt_caching_requests_pagination.py
test_ptu_share_attribution.py
test_requester_ip_address_logging.py
test_reset_budget_leader_election.py test(spend): wait for the scheduled reset to commit before reading the reset row (#52128) 2026-11-16 21:55:56 +00:00
test_responses_bridge_spend_once.py fix(logging): keep the caller's call_type when chat completions are bridged to the Responses API (#49710) 2026-11-03 10:02:54 +00:00
test_responses_cache_write_itemization.py
test_responses_stream_spend_row_id.py fix(spend): keep free response reads and cancels off the creation spend row (#51110) 2026-11-11 07:02:00 +00:00
test_responses_websocket_turn_rows.py
test_roi_branch_spend.py
test_router_cooldown_failure_row.py
test_scoped_spend_reports.py
test_service_tier_stream_billing.py
test_session_grouped_logs_pages.py fix(proxy): open the Logs drawer by request_id without scanning for litellm_call_id (#50789) 2026-11-10 17:03:21 +00:00
test_session_token_user_email.py fix(auth): carry the user row's email on refreshed session tokens (#53184) 2026-11-21 11:57:49 -08:00
test_session_total_spend.py
test_shutdown_flush.py test(integration): update two spend tests left stale by the rust spend log writer (#53363) 2026-11-21 12:01:35 -08:00
test_spend_attribution_contracts.py
test_spend_calculate.py
test_spend_capture_rate_captured_spend.py
test_spend_log_caller_session.py
test_spend_log_guardrail_index_retention.py fix(proxy): prune expired LiteLLM_SpendLogGuardrailIndex rows with spend-log retention (#51518) 2026-11-19 09:32:09 -08:00
test_spend_log_latest_turn.py feat(spend-logs): opt-in latest_turn mode that stores only the current turn of stateless requests (#49544) 2026-11-05 19:41:15 -08:00
test_spend_log_read_scope.py feat(proxy)!: let every key read its own spend logs and return 403 for filters outside the caller's scope (#52449) 2026-11-19 03:14:35 +00:00
test_spend_log_tool_payload_content.py perf(logging): scan opt-in spend-log tokens natively (#51770) 2026-11-15 06:09:02 +08:00
test_spend_log_write_batching.py
test_spend_logs_metadata_fields.py
test_spend_rollup_accuracy.py
test_stream_alias_billing.py
test_streamed_usage_estimate.py
test_tag_budget_enforcement.py fix(budgets): invalidate customer hierarchy caches through stored team IDs (#51654) 2026-11-13 18:43:38 +00:00
test_tag_spend_reset.py feat(tags): reset a tag's spend through /tag/update (#50323) 2026-11-06 10:41:22 -08:00
test_team_budget_alerts.py feat(proxy): add team budget percentage email alerts (#52859) 2026-11-19 16:21:25 -08:00
test_team_budget_enforcement.py
test_team_daily_activity_aggregated.py
test_team_member_budget_alerts.py
test_team_member_spend.py test: update the spend tests that still expected the pre-ledger accounting queues (#50814) 2026-11-09 22:07:42 -08:00
test_team_member_spend_flush.py fix(integration): size rig pools for the rust connection share and stop the router importing the proxy (#52532) 2026-11-18 18:41:36 +00:00
test_team_member_total_spend_reconciliation.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_text_completion_stream_usage_cost.py
test_unmanaged_vertex_batch_deployment_routing_wire.py
test_usage_export_metadata.py feat(usage-export): include key and user metadata objects in daily activity export rows (#49360) 2026-11-20 03:58:01 +00:00
test_user_budget_on_team_keys.py
test_vertex_gemini_image_token_spend.py fix(vertex_ai): bill gemini image text, thinking and priority tokens at their own rates (#51017) 2026-11-11 02:50:55 +00:00
test_vertex_image_regional_uplift.py test(spend): expect token billing for Vertex image edits with usage (#51109) 2026-11-11 03:32:19 +00:00
test_vertex_passthrough_regional_uplift_spend.py
test_vertex_regional_uplift_spend.py test(spend): expect token billing for Vertex image edits (#51148) 2026-11-11 06:27:58 +00:00