mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
Fix batch tests
This commit is contained in:
parent
1657af81eb
commit
991fee056f
3 changed files with 7 additions and 7 deletions
|
|
@ -396,7 +396,7 @@ class AnthropicPassthroughLoggingHandler:
|
|||
|
||||
# Add batch-specific metadata to indicate this is a pending batch job
|
||||
litellm_model_response.choices = [Choices(
|
||||
finish_reason="batch_pending",
|
||||
finish_reason="stop",
|
||||
index=0,
|
||||
message={
|
||||
"role": "assistant",
|
||||
|
|
@ -438,7 +438,7 @@ class AnthropicPassthroughLoggingHandler:
|
|||
|
||||
# Add error-specific metadata
|
||||
litellm_model_response.choices = [Choices(
|
||||
finish_reason="batch_error",
|
||||
finish_reason="stop",
|
||||
index=0,
|
||||
message={
|
||||
"role": "assistant",
|
||||
|
|
@ -472,7 +472,7 @@ class AnthropicPassthroughLoggingHandler:
|
|||
|
||||
# Add error-specific metadata
|
||||
litellm_model_response.choices = [Choices(
|
||||
finish_reason="batch_error",
|
||||
finish_reason="stop",
|
||||
index=0,
|
||||
message={
|
||||
"role": "assistant",
|
||||
|
|
|
|||
|
|
@ -619,7 +619,7 @@ class VertexPassthroughLoggingHandler:
|
|||
|
||||
# Add batch-specific metadata to indicate this is a pending batch job
|
||||
litellm_model_response.choices = [Choices(
|
||||
finish_reason="batch_pending",
|
||||
finish_reason="stop",
|
||||
index=0,
|
||||
message={
|
||||
"role": "assistant",
|
||||
|
|
@ -661,7 +661,7 @@ class VertexPassthroughLoggingHandler:
|
|||
|
||||
# Add error-specific metadata
|
||||
litellm_model_response.choices = [Choices(
|
||||
finish_reason="batch_error",
|
||||
finish_reason="stop",
|
||||
index=0,
|
||||
message={
|
||||
"role": "assistant",
|
||||
|
|
@ -695,7 +695,7 @@ class VertexPassthroughLoggingHandler:
|
|||
|
||||
# Add error-specific metadata
|
||||
litellm_model_response.choices = [Choices(
|
||||
finish_reason="batch_error",
|
||||
finish_reason="stop",
|
||||
index=0,
|
||||
message={
|
||||
"role": "assistant",
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class TestVertexAIBatchPassthroughHandler:
|
|||
assert result is not None
|
||||
assert "result" in result
|
||||
assert "kwargs" in result
|
||||
assert result["result"].choices[0].finish_reason == "batch_error"
|
||||
assert result["result"].choices[0].finish_reason == "stop"
|
||||
assert result["kwargs"]["batch_job_state"] == "JOB_STATE_FAILED"
|
||||
|
||||
def test_get_actual_model_id_from_router_with_router(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue