From bb612b889a32c2fa6f6da3b01702eb27204c37ba Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2026 09:35:24 +0000 Subject: [PATCH] test(autoroute): read the fuzzy selection through the public InquirerPy property Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../test_litellm/proxy/client/cli/autoroute/test_wizard.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_litellm/proxy/client/cli/autoroute/test_wizard.py b/tests/test_litellm/proxy/client/cli/autoroute/test_wizard.py index 64c54eedda3..c0e5377b170 100644 --- a/tests/test_litellm/proxy/client/cli/autoroute/test_wizard.py +++ b/tests/test_litellm/proxy/client/cli/autoroute/test_wizard.py @@ -292,11 +292,10 @@ def _highlighted_choice(session: AppSession) -> Optional[str]: controls = [c for c in session.app.layout.find_all_controls() if isinstance(c, InquirerPyFuzzyControl)] if not controls: return None - filtered_choices = controls[0]._filtered_choices - index = controls[0].selected_choice_index - if not 0 <= index < len(filtered_choices): + try: + return controls[0].selection["name"] + except IndexError: return None - return filtered_choices[index]["name"] async def _wait_until_highlighted(session: AppSession, name: str) -> None: