mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Updated the test case
This commit is contained in:
parent
9717d89e69
commit
0cf1d70955
3 changed files with 131 additions and 64 deletions
|
@ -183,6 +183,13 @@ async def run_async_fallback(
|
|||
response=response,
|
||||
attempted_fallbacks=fallback_depth,
|
||||
)
|
||||
|
||||
# If this was a mid-stream fallback, also add that to response headers
|
||||
if is_mid_stream and hasattr(response, "_hidden_params"):
|
||||
response._hidden_params.setdefault("additional_headers", {})
|
||||
response._hidden_params["additional_headers"]["x-litellm-mid-stream-fallback"] = True
|
||||
response._hidden_params["additional_headers"]["x-litellm-previous-content-length"] = len(previous_content)
|
||||
|
||||
# callback for successfull_fallback_event():
|
||||
await log_success_fallback_event(
|
||||
original_model_group=original_model_group,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue