Skip to content

Add --max-reflections CLI option (fixes #3865)#5011

Open
Discotech17 wants to merge 1 commit intoAider-AI:mainfrom
Discotech17:feature/configurable-max-reflections
Open

Add --max-reflections CLI option (fixes #3865)#5011
Discotech17 wants to merge 1 commit intoAider-AI:mainfrom
Discotech17:feature/configurable-max-reflections

Conversation

@Discotech17
Copy link
Copy Markdown

Fixes #3865

max_reflections was hardcoded to 3 in base_coder.py with no way
to configure it. This adds a --max-reflections CLI flag so users can
adjust it for complex tasks.

Changes:

  • args.py: add --max-reflections argument (default: 3)
  • base_coder.py: move max_reflections from class attribute to __init__ parameter
  • main.py: pass args.max_reflections into Coder.create()

Also works via:

  • Config file: max-reflections: 5 in .aider.conf.yml
  • Env var: AIDER_MAX_REFLECTIONS=5

No behavior change for existing users (default remains 3).

@arnowaschk
Copy link
Copy Markdown

This is really helpful for local LLM setups!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to configure max_reflections setting

2 participants