diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 4c9f8eca9..99137e2fa 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -953,7 +953,14 @@ class Coder: def check_model_availability(io, client, main_model): - available_models = client.models.list() + try: + available_models = client.models.list() + except openai.NotFoundError: + # Azure sometimes returns 404? + # https://discord.com/channels/1131200896827654144/1182327371232186459 + io.tool_error("Unable to list available models, proceeding with {main_model.name}") + return True + model_ids = sorted(model.id for model in available_models) if main_model.name in model_ids: return True diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index 6c8e5135d..6e8e8c664 100755 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -30,7 +30,7 @@ from aider.coders import Coder from aider.dump import dump # noqa: F401 from aider.io import InputOutput -BENCHMARK_DNAME = Path(os.environ["AIDER_BENCHMARK_DIR"]) +BENCHMARK_DNAME = Path(os.environ.get("AIDER_BENCHMARK_DIR", "tmp.benchmarks")) ORIGINAL_DNAME = BENCHMARK_DNAME / "exercism-python"