litellm/tests/integration/database
Yujong Lee b09a08699f fix(lens): record model-call spend in a step ledger instead of the versioned document
Every analysis model call reserved and settled its budget by rewriting the whole
Lens document through the optimistic compare-and-swap, so a worker running eight
calls at once starved the eight-attempt retry loop and the proxy answered
409 "Could not reserve analysis budget", which the worker treats as fatal

Reservations are now rows in LiteLLM_LensRun next to archived runs, written with
one atomic statement that also moves the month's counter. The counter and
budget month are server-owned keys of the document that document writes carry
over, and Job.cost and Job.steps are read from the ledger. Stage markers go to
the same ledger. Document writes keep the compare-and-swap, now with jittered
backoff, and return the stored row

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-04 21:18:11 -07:00
..
test_chunked_in_lists.py ci: fail on new unbounded SQL IN lists and add a Prisma chunking helper (#42629) 2026-09-26 13:40:44 -07:00
test_lens_repository.py fix(lens): record model-call spend in a step ledger instead of the versioned document 2026-10-04 21:18:11 -07:00
test_managed_file_flat_ids_index.py fix(vector_stores): return managed file ids from vector store file list (#43800) 2026-10-02 21:28:50 -07:00
test_migration_entrypoint.py test(integration): regression tests for July cost tracking, budgeting and spend bugs (#42694) 2026-09-23 09:51:56 -07:00
test_partition_transactions.py Format database and accounting integration tests 2026-09-14 21:24:20 -07:00
test_reader_writer_regeneration.py test: add extension and browser integration contracts 2026-09-16 13:15:53 -07:00
test_request_log_indexes_at_boot.py fix(proxy): always exit when database setup fails at boot (#44141) 2026-10-01 21:51:06 -07:00
test_roi_observed.py feat(roi): measure shipping velocity, quality, and recorded spend (#44426) 2026-10-03 23:07:34 +00:00
test_roi_sync_store.py feat(proxy): add native ROI calculator for gateway spend vs merged PRs (#43669) 2026-09-30 14:16:41 -07:00
test_transaction_atomicity.py test(integration): add read-replica routing harness to the CircleCI integration suite (#42692) 2026-09-24 00:25:03 -07:00
test_v1_migration_error_logging.py fix(proxy-extras): log v1 migration failures at ERROR so LITELLM_LOG=ERROR shows them (#44202) 2026-10-03 22:45:16 -07:00