mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
fix: improve PDF support detection and update model suggestions
This commit is contained in:
parent
9c8bde2cff
commit
a64956406d
1 changed files with 5 additions and 5 deletions
|
@ -719,10 +719,12 @@ class Coder:
|
|||
|
||||
def get_images_message(self, fnames):
|
||||
supports_images = self.main_model.info.get("supports_vision")
|
||||
supports_pdfs = self.main_model.info.get("supports_pdf_input")
|
||||
supports_pdfs = self.main_model.info.get("supports_pdf_input") or self.main_model.info.get(
|
||||
"max_pdf_size_mb"
|
||||
)
|
||||
|
||||
# https://github.com/BerriAI/litellm/pull/6928
|
||||
supports_pdfs = "claude-3-5-sonnet-20241022" in self.main_model.name
|
||||
supports_pdfs = supports_pdfs or "claude-3-5-sonnet-20241022" in self.main_model.name
|
||||
|
||||
if not (supports_images or supports_pdfs):
|
||||
return None
|
||||
|
@ -1396,9 +1398,7 @@ class Coder:
|
|||
res.append("- Ask for smaller changes in each request.")
|
||||
res.append("- Break your code into smaller source files.")
|
||||
if "diff" not in self.main_model.edit_format:
|
||||
res.append(
|
||||
"- Use a stronger model like gpt-4o, sonnet or opus that can return diffs."
|
||||
)
|
||||
res.append("- Use a stronger model that can return diffs.")
|
||||
|
||||
if input_tokens >= max_input_tokens or total_tokens >= max_input_tokens:
|
||||
res.append("")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue