Repository navigation
fix: Set standard_logging_object for pass-through endpoints - #19887
Merged
2 commits merged intoJan 31, 2026
Merged
2 commits merged into
2 commits merged into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
neubig
marked this pull request as draft
January 27, 2026 22:14
neubig
force-pushed
the
fix/standard-logging-payload-none
branch
from
January 27, 2026 23:14
bc9f62d to
ec22a7a
Compare
neubig
force-pushed
the
fix/standard-logging-payload-none
branch
from
January 27, 2026 23:17
ec22a7a to
101ea25
Compare
neubig
force-pushed
the
fix/standard-logging-payload-none
branch
from
January 27, 2026 23:23
101ea25 to
be6f572
Compare
neubig
force-pushed
the
fix/standard-logging-payload-none
branch
from
January 27, 2026 23:25
be6f572 to
6db2b74
Compare
neubig
force-pushed
the
fix/standard-logging-payload-none
branch
from
January 27, 2026 23:27
6db2b74 to
8357c15
Compare
neubig
force-pushed
the
fix/standard-logging-payload-none
branch
from
January 27, 2026 23:31
8357c15 to
4cb3746
Compare
neubig
force-pushed
the
fix/standard-logging-payload-none
branch
from
January 27, 2026 23:56
4cb3746 to
2150bb6
Compare
Pass-through endpoints (like vLLM classify) were not setting
standard_logging_object because _get_assembled_streaming_response
returns None for non-ModelResponse results.
This caused model_max_budget_limiter.async_log_success_event to raise
ValueError('standard_logging_payload is required').
The fix adds an elif branch in async_success_handler that mirrors the
non-pass-through code path.
Co-authored-by: openhands <openhands@all-hands.dev>
neubig
force-pushed
the
fix/standard-logging-payload-none
branch
from
January 28, 2026 00:04
2150bb6 to
72ca9f2
Compare
neubig
marked this pull request as ready for review
January 28, 2026 01:02
ghost
merged commit Jan 31, 2026
22dd7c2
into
BerriAI:litellm_oss_staging_01_31_2026
2 checks passed
Sameerlite
pushed a commit
that referenced
this pull request
Feb 2, 2026
Pass-through endpoints (like vLLM classify) were not setting
standard_logging_object because _get_assembled_streaming_response
returns None for non-ModelResponse results.
This caused model_max_budget_limiter.async_log_success_event to raise
ValueError('standard_logging_payload is required').
The fix adds an elif branch in async_success_handler that mirrors the
non-pass-through code path.
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
ishaan-jaff
added a commit
that referenced
this pull request
Feb 21, 2026
…uccess_handler Two places in the logging pipeline were overwriting response_cost that pass-through handlers (Gemini/Vertex) had already calculated: 1. _process_hidden_params_and_response_cost fell through to _response_cost_calculator which returns None for pass-through calls 2. async_success_handler pass-through branch unconditionally set response_cost = None (introduced in PR #19887) Now both places check if response_cost is already set before overwriting.
3 of 4 tasks
ishaan-jaff
added a commit
that referenced
this pull request
Feb 21, 2026
* fix(logging): preserve pass-through endpoint response_cost in async_success_handler Two places in the logging pipeline were overwriting response_cost that pass-through handlers (Gemini/Vertex) had already calculated: 1. _process_hidden_params_and_response_cost fell through to _response_cost_calculator which returns None for pass-through calls 2. async_success_handler pass-through branch unconditionally set response_cost = None (introduced in PR #19887) Now both places check if response_cost is already set before overwriting. * test: add regression test for pass-through endpoint response_cost preservation
3 of 7 tasks
fzowl
pushed a commit
to fzowl/litellm
that referenced
this pull request
Jun 24, 2026
…19887) Pass-through endpoints (like vLLM classify) were not setting standard_logging_object because _get_assembled_streaming_response returns None for non-ModelResponse results. This caused model_max_budget_limiter.async_log_success_event to raise ValueError('standard_logging_payload is required'). The fix adds an elif branch in async_success_handler that mirrors the non-pass-through code path. Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
fzowl
pushed a commit
to fzowl/litellm
that referenced
this pull request
Jun 24, 2026
…1844) * fix(logging): preserve pass-through endpoint response_cost in async_success_handler Two places in the logging pipeline were overwriting response_cost that pass-through handlers (Gemini/Vertex) had already calculated: 1. _process_hidden_params_and_response_cost fell through to _response_cost_calculator which returns None for pass-through calls 2. async_success_handler pass-through branch unconditionally set response_cost = None (introduced in PR BerriAI#19887) Now both places check if response_cost is already set before overwriting. * test: add regression test for pass-through endpoint response_cost preservation
This pull request was closed.
This branch had an error being deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes the
ValueError: standard_logging_payload is requirederror that occurs when using pass-through endpoints like vLLM classify.Root Cause
Pass-through endpoints were not setting
standard_logging_objectbecause_get_assembled_streaming_responsereturnsNonefor non-ModelResponseresults (e.g.,StandardPassThroughResponseObject).This caused
model_max_budget_limiter.async_log_success_eventto raiseValueError('standard_logging_payload is required').The Fix
Added an
elifbranch inasync_success_handlerthat mirrors the non-pass-through code path as closely as possible:Consistency with Non-Pass-Through Code Path
The fix mirrors the non-pass-through code path:
print_verbose("Got a complete streaming response")print_verbose("Got a pass-through endpoint response")async_complete_streaming_response = complete_streaming_responseasync_complete_streaming_response = resultresponse_cost = _response_cost_calculator()orNoneon errorresponse_cost = None(not possible for pass-through)standard_logging_object = get_standard_logging_object_payload()emit_standard_logging_payload()Cost calculation is set to
Nonefor pass-through endpoints becauseStandardPassThroughResponseObjectdoesn't have standard usage info that_response_cost_calculator()expects.Changes
litellm/litellm_core_utils/litellm_logging.py: Added elif branch that mirrors non-pass-through code pathtests/test_litellm/litellm_core_utils/test_litellm_logging.py: Added regression tests:test_async_success_handler_sets_standard_logging_object_for_pass_through_endpointstest_async_success_handler_sets_standard_logging_object_for_streaming_pass_throughtest_async_success_handler_prevents_reprocessing_for_pass_through_endpointsTesting
standard_logging_objectis set for non-streaming pass-through endpointsstandard_logging_objectis set for streaming pass-through endpointsasync_complete_streaming_responseprevents re-processingresponse_costis set toNone(consistent with error handling)Related Issues