diff --git a/aider/commands.py b/aider/commands.py index 958902977..3cbf7967c 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -5,6 +5,7 @@ import sys from pathlib import Path import git +import litellm import openai from prompt_toolkit.completion import Completion @@ -14,6 +15,8 @@ from aider.utils import is_image_file from .dump import dump # noqa: F401 +litellm.suppress_debug_info = True + class SwitchModel(Exception): def __init__(self, model): @@ -41,6 +44,12 @@ class Commands: models.sanity_check_models(self.io, model) raise SwitchModel(model) + def completions_model(self, partial): + models = litellm.model_cost.keys() + for model in models: + if partial.lower() in model.lower(): + yield Completion(model, start_position=-len(partial)) + def cmd_models(self, args): "Search the list of available models"