Repository navigation
feat(batches): store each batch line's request and response in S3 and GCS #41691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
yucheng-berri
merged 116 commits into
main
from
litellm_batch_jsonl_line_item_callbacks
Oct 15, 2026
Merged
Changes from 81 commits
Commits
Show all changes
116 commits
Select commit
Hold shift + click to select a range
b38b867
feat(batches): emit per-line JSONL batch records to callbacks
shivamrawat1 0ea8ce7
fix(batches): only emit line items for final batches
shivamrawat1 7fa8c92
chore(deps): bump soupsieve to 2.9.2 for GHSA-gjv8-xp57-g29c and GHSA…
shivamrawat1 c7edcce
style(batches): satisfy ruff format for line item logging
shivamrawat1 7f06708
chore(ui): regenerate schema.d.ts for store_batch_line_items_in_callb…
shivamrawat1 8908023
test(batches): cover line-item edge shapes and general settings propa…
shivamrawat1 8aca0c3
fix(batches): keep deployment credentials out of callback-visible params
shivamrawat1 ff9d30b
refactor(batches): declare credential transport attribute on Logging
shivamrawat1 feea6f2
chore: merge origin/main into litellm_batch_jsonl_line_item_callbacks
shivamrawat1 775d851
chore: merge origin/main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri 8484b2f
test(batches): integration contract for per-line batch callback events
yucheng-berri b4cb884
fix(proxy): resolve store_batch_line_items_in_callbacks through the s…
yucheng-berri 61d5ab0
test(batches): assert per-line events beside the aggregate and create…
yucheng-berri bc53e23
fix(proxy): drop resurrected use_legacy_interactions_schema shim from…
yucheng-berri 4b6efef
test(batches): assert line item events carry no credentials
yucheng-berri ed23e2e
fix(proxy): reset batch line-item flag when the setting is absent
yucheng-berri 096ba84
fix(batches): map anthropic batch lines through the anthropic message…
yucheng-berri a8fafaf
style: tag the anthropic result cast with a cast-ok reason
yucheng-berri c746e57
style: shorten cast-ok reason so ruff format passes
yucheng-berri 45b7509
fix(batches): skip line-item callbacks for providers without a line r…
yucheng-berri bef2f04
fix(batches): reconstruct bedrock and mistral batch lines through the…
yucheng-berri 6cbad5c
style: wrap widened provider literals so ruff format passes
yucheng-berri a760991
fix(batches): pair bedrock lines by recordId and type them from the r…
yucheng-berri 271b6c6
chore: merge main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri c0b69ae
fix(batches): keep line item events out of proxy limiters and strip c…
yucheng-berri 67d4471
fix(batches): keep cast-ok tags on the flagged cast lines for the dis…
yucheng-berri ee8dcfc
fix(batches): skip failed line item events in parallel request limite…
yucheng-berri a2fd2a8
test(batches): tolerate lifecycle spend rows when asserting no line i…
yucheng-berri fe11251
chore: merge main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri 05d6977
fix(batches): place mutable-ok tags on the lines the discipline gate …
yucheng-berri f5670e0
fix(batches): skip router budget accounting for batch line item events
yucheng-berri 0ca85b4
chore: merge main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri dd9d4fd
chore: merge main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri 4c86f0b
fix(batches): keep anthropic line errors and skip native vertex batch…
yucheng-berri 5777f7e
test(batches): restore test-quality tags on line item tests
yucheng-berri 87d82b9
chore: merge main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri f4a6e12
Merge remote-tracking branch 'origin/main' into litellm_batch_jsonl_l…
yucheng-berri f3ba65d
test: move batch line-item unit test to tests/unit after merging main
yucheng-berri f65b5b1
fix(batches): emit batch line-item callbacks once per batch
yucheng-berri cffa640
fix(batches): release line-item claim when fan-out emitted nothing
yucheng-berri a7c9ded
fix(batches): make the line-item claim release ownership-safe
yucheng-berri f69d5c5
fix(batches): keep bodyless failed batch lines reaching callbacks
yucheng-berri 5f35c25
fix(logging): seed batch line hidden params in get_hidden_params defa…
yucheng-berri a891065
merge: main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri ff77170
perf(batches): reuse fetched batch result files for line-item logging
yucheng-berri 1388dbc
fix(batches): release line-item claim when nothing was emitted
yucheng-berri ee21adb
Merge remote-tracking branch 'origin/main' into litellm_batch_jsonl_l…
yucheng-berri 4d96efc
Merge remote-tracking branch 'origin/main' into litellm_batch_jsonl_l…
yucheng-berri 64c514c
fix(batches): type batch line-item callback sites to satisfy basedpyr…
yucheng-berri aebde2a
style: wrap batch hidden-params cast for ruff format
yucheng-berri 06fb342
Merge remote-tracking branch 'origin/main' into litellm_batch_jsonl_l…
yucheng-berri eac1ed0
fix(batches): reason suppressions for batch line-item lint deltas
yucheng-berri e1b9449
Merge remote-tracking branch 'origin/main' into litellm_batch_jsonl_l…
yucheng-berri 60a47e2
chore: drop stale mutable-ok suppressions after LIT002 removal
yucheng-berri a7f1978
fix(batches): skip batch line-item events in ClickHouse spend sink an…
yucheng-berri 9ca41c9
Merge origin/main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri 9c71dae
fix(clickhouse): skip failed batch line items in the spend sink too
yucheng-berri 8ec50a2
fix(batches): declare batch_line_items service family on claim calls
yucheng-berri a35d4ee
fix(integrations): keep batch line items out of the built-in metering…
yucheng-berri c9f67ff
style: format metering-sinks test
yucheng-berri 1b02cb6
fix(otel): skip synthetic line-item durations in v2 metrics; isolate …
yucheng-berri 6348a7d
Merge remote-tracking branch 'origin/main' into litellm_batch_jsonl_l…
yucheng-berri b139924
chore: merge main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri db33862
chore: merge main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri 15fa86c
chore: merge main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri 1b63787
chore: finish main merge conflict resolution for batch line items
yucheng-berri 235019d
style: sort imports in litellm_logging after main merge
yucheng-berri 6b8fb29
chore: merge origin/main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri 0632fdd
Merge remote-tracking branch 'origin/main' into fix41691
yucheng-berri b57e4f0
test(batches): use the public hook class names main now exports
yucheng-berri c653e2e
fix(batches): only the batch writer can mark a callback event as a li…
yucheng-berri e00471b
chore(batches): keep the lint gates within main's ceilings after the …
yucheng-berri 317764c
fix(anthropic): read the message id off the validated message
yucheng-berri 85fc449
fix(batches): an unreadable error file no longer drops the output lin…
yucheng-berri 21cd892
test(batches): pin billing for batch_parent_id on every endpoint and …
yucheng-berri 7cf3024
test(batches): bill every request of a concurrent burst mixing forged…
yucheng-berri 4bd5762
revert: keep the line-item fan-out all-or-nothing on an unreadable er…
yucheng-berri 4cc9f56
test(batches): pin the all-or-nothing retry and warm the burst model …
yucheng-berri 586b022
Merge remote-tracking branch 'origin/main' into fix41691
yucheng-berri f26f86b
Merge remote-tracking branch 'origin/main' into fix41691
yucheng-berri 07d543c
fix(batches): run the line fan-out outside the aggregate event's dead…
yucheng-berri 6e826b4
fix(batches): let running line fan-outs finish before proxy shutdown …
yucheng-berri fd7a099
Merge remote-tracking branch 'origin/main' into fix41691
yucheng-berri 9ed3211
fix(batches): keep batch line fields off callback kwargs and skip fan…
yucheng-berri 8a46101
fix(batches): log batch lines under the retrieve's callback settings …
yucheng-berri 7ae8fec
test(batches): line events follow the key's message logging opt-out
yucheng-berri 903c593
test(batches): line events follow team logging settings, keep the lin…
yucheng-berri 2b30a09
fix(batches): keep in-memory line claims for 10,000 batches and pin m…
yucheng-berri 0865123
Keep batch line unit tests in-process and drop repeated per-sink comm…
yucheng-berri 56b60e6
Share one batch provider alias across batch_utils and line item logging
yucheng-berri 0470177
Report Bedrock line status codes, skip unknown Bedrock lines without …
yucheng-berri 8f2c935
Read a swallowed Redis claim failure as unavailable, price unpriceabl…
yucheng-berri d62c5f2
Call handle_completed_batch when line items are off, keep a cache tes…
yucheng-berri f6dc422
Hand the cost poller's credential snapshot to line item file reads, s…
yucheng-berri 6125f5f
Log batch lines through the sync callbacks a direct async call runs, …
yucheng-berri cbdbbb5
fix(batches): log failed Bedrock embedding lines as embeddings with t…
yucheng-berri 5460242
fix(batches): keep a Bedrock line's system prompt in its logged messages
yucheng-berri f010f96
Merge remote-tracking branch 'origin/main' into fix41691
yucheng-berri 4c120da
feat(batches): store per-line batch requests and responses in S3/GCS …
yucheng-berri 7ab9a3f
fix(batches): store batch line items after the batch is billed and re…
yucheng-berri 5cad620
test(batches): cover team-level and deleted-key redaction of batch li…
yucheng-berri aa76a2e
fix(batches): store batch line items in the background so a hung buck…
yucheng-berri 15f3d73
fix(batches): store an unbilled batch's line items only once it is re…
yucheng-berri 21a7109
fix(batches): price and write batch line items off the event loop
yucheng-berri 082a859
fix(batches): pair no request for a shared custom_id and wait for an …
yucheng-berri 459234f
fix(batches): store batch line items only once the poll has billed ev…
yucheng-berri 400a6f9
fix(batches): hash line-item objects off the event loop and keep line…
yucheng-berri ee61a60
fix(batches): keep request and response for batches created without a…
yucheng-berri 85169fc
fix(batches): pair line items with the right request on every deploym…
yucheng-berri 2875f03
fix(batches): let OAuth2 batches follow team and proxy message loggin…
yucheng-berri 4ba1eaa
Merge branch 'main' into litellm_batch_jsonl_line_item_callbacks
yucheng-berri 0ee34c9
fix(batches): hash the creator credential and write batch line items …
yucheng-berri a02fc23
chore: merge main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri bc925d4
docs(batches): say async_log_batch_line_items is called once per part
yucheng-berri 315d705
fix(batches): log an error when a batch's deployment is gone before i…
yucheng-berri c75d257
Merge origin/main into litellm_batch_jsonl_line_item_callbacks
yucheng-berri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.