Skip to content

Commit 8de8fe6

Browse files
author
jzhu
committed
fix: prevent parsing error messages containing 'expected' or 'error' as model lists
1 parent 5276d9b commit 8de8fe6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

code_assistant_manager/endpoints.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,10 @@ def _parse_text_models(self, output: str) -> List[str]:
489489
Returns:
490490
List of model IDs
491491
"""
492+
# Check if output looks like an error message
493+
if "expected" in output.lower() or "error" in output.lower():
494+
return []
495+
492496
models = []
493497

494498
for line in output.split("\n"):

0 commit comments

Comments
 (0)