mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
Merge branch 'main' into gemini-editblock-and-examples
This commit is contained in:
commit
0fb08896e3
6 changed files with 34 additions and 6 deletions
|
@ -11,6 +11,7 @@ from json.decoder import JSONDecodeError
|
|||
from pathlib import Path
|
||||
|
||||
import git
|
||||
import litellm
|
||||
import openai
|
||||
from jsonschema import Draft7Validator
|
||||
from rich.console import Console, Text
|
||||
|
@ -28,6 +29,8 @@ from aider.utils import is_image_file
|
|||
|
||||
from ..dump import dump # noqa: F401
|
||||
|
||||
litellm.suppress_debug_info = True
|
||||
|
||||
|
||||
class MissingAPIKeyError(ValueError):
|
||||
pass
|
||||
|
@ -597,6 +600,9 @@ class Coder:
|
|||
interrupted = True
|
||||
except ExhaustedContextWindow:
|
||||
exhausted = True
|
||||
except litellm.exceptions.BadRequestError as err:
|
||||
self.io.tool_error(f"BadRequestError: {err}")
|
||||
return
|
||||
except openai.BadRequestError as err:
|
||||
if "maximum context length" in str(err):
|
||||
exhausted = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue