mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
test(router): assert the auto-router max_input_chars kwarg
PR #35956 added the max_input_chars passthrough to the AutoRouter constructor but left this mock assertion in tests/router_unit_tests unchanged, so test_init_auto_router_deployment_success has been failing on litellm_internal_staging ever since. The passthrough itself is intentional and its behaviour is already covered by TestAutoRouterMaxInputCharsWiring in tests/test_litellm, so only the stale expected kwargs need updating. Assert the shared constant rather than the literal 2000 so tuning the default does not break this test again.
This commit is contained in:
parent
c1fa15132b
commit
495eb7e7f4
1 changed files with 2 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ from unittest.mock import patch, MagicMock, AsyncMock
|
|||
from create_mock_standard_logging_payload import create_standard_logging_payload
|
||||
from litellm.types.utils import StandardLoggingPayload
|
||||
from litellm.types.router import Deployment, LiteLLM_Params, ModelInfo
|
||||
from litellm.constants import DEFAULT_AUTO_ROUTER_MAX_INPUT_CHARS
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
@ -1816,6 +1817,7 @@ def test_init_auto_router_deployment_success(mock_auto_router, model_list):
|
|||
default_model="gpt-5-mini",
|
||||
embedding_model="text-embedding-3-small",
|
||||
litellm_router_instance=router,
|
||||
max_input_chars=DEFAULT_AUTO_ROUTER_MAX_INPUT_CHARS,
|
||||
)
|
||||
|
||||
# Verify the auto-router was added to the router's auto_routers dict
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue