mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
Fix #23836: [Bug]: Health checks use max_completion_tokens=1, causing failures for GPT-5 models
This commit is contained in:
parent
33c3f13443
commit
043bc8e7f8
2 changed files with 3 additions and 3 deletions
|
|
@ -284,7 +284,7 @@ def _update_litellm_params_for_health_check(
|
|||
elif "*" not in (
|
||||
model_info.get("health_check_model") or litellm_params.get("model") or ""
|
||||
):
|
||||
litellm_params["max_tokens"] = 1
|
||||
litellm_params["max_tokens"] = 16
|
||||
|
||||
_health_check_model = model_info.get("health_check_model", None)
|
||||
if _health_check_model is not None:
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ from unittest.mock import AsyncMock, patch, MagicMock
|
|||
@pytest.mark.asyncio
|
||||
async def test_update_litellm_params_max_tokens_default():
|
||||
"""
|
||||
Test that max_tokens defaults to 1 for non-wildcard models.
|
||||
Test that max_tokens defaults to 16 for non-wildcard models.
|
||||
"""
|
||||
model_info = {}
|
||||
litellm_params = {"model": "gpt-4"}
|
||||
|
||||
updated_params = _update_litellm_params_for_health_check(model_info, litellm_params)
|
||||
|
||||
assert updated_params["max_tokens"] == 1
|
||||
assert updated_params["max_tokens"] == 16
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue