Commit Graph

419 Commits

Author SHA1 Message Date
Ariel Frischer 46e7340ddb
Add configurable --recursion-limit argument (#46)
* test: Add unit tests for argument parsing in __main__.py

* test: Update tests to remove invalid argument and improve error handling

* test: Fix test_missing_message to handle missing argument cases correctly

* test: Fix test_missing_message to reflect argument parsing behavior

* test: Combine recursion limit tests and verify global config updates

* fix: Include recursion_limit in config for recursion limit tests

* test: Mock dependencies and validate recursion limit in global config

* test: Remove commented-out code and clean up test_main.py

* test: Remove self-evident comments and improve test assertions in test_main.py

* fix: Mock user input and handle temperature in global config tests

* fix: Fix test failures by correcting mock targets and handling temperature

* test: Update temperature validation to check argument passing to initialize_llm

* fix: Correct mock for ask_human and access kwargs in temperature test

* fix: Patch the entire ask_human function in test_chat_mode_implies_hil

* docs: Add recursion limit option to README documentation

* docs: Update README.md with all available command line arguments

* feat(config): add DEFAULT_RECURSION_LIMIT constant to set default recursion depth
feat(main.py): add --recursion-limit argument to configure maximum recursion depth for agent operations
fix(main.py): validate that recursion limit is positive before processing
refactor(main.py): use args.recursion_limit in agent configuration instead of hardcoded value
refactor(agent_utils.py): update agent configuration to use recursion limit from global memory or default value
refactor(run_research_agent): clean up comments and improve readability
refactor(run_web_research_agent): clean up comments and improve readability
refactor(run_planning_agent): clean up comments and improve readability
refactor(run_task_implementation_agent): clean up comments and improve readability
delete(test_main.py): remove obsolete test for chat mode and HIL configuration
2025-01-21 11:46:56 -05:00
Jose M Leon e886d98c0e
FIX Issue 42: Error with Levenshtein (#44)
* FIX install error from Levenshtein by removing that dep in favor of python native

* FIX error during git push

* fixes

* wip

* wip
2025-01-21 11:46:15 -05:00
Ariel Frischer 1029be7df9
chore(dependencies): update aider-chat version from 0.69.1 to 0.72.1 to incorporate latest features and fixes (#47) 2025-01-21 11:45:54 -05:00
Ariel Frischer 32fcf914ed
Set Default Max Token Limit with Provider/Model Dictionary and Limit Tokens for Anthropic Claude React Agent (#45)
* feat(agent_utils.py): add get_model_token_limit function to retrieve token limits for models based on provider and model name
feat(models_tokens.py): create models_tokens module to store token limits for various models and providers
test(agent_utils.py): implement unit tests for get_model_token_limit and create_agent functions to ensure correct behavior and error handling

* test: Add unit tests for token limiting and agent creation functionality

* fix: Correct indentation and add missing test function for error handling

* fix: Update test assertion to use messages_modifier instead of state_modifier

* feat(agent_utils.py): add limit_tokens function to manage message token limits and preserve system message
fix(agent_utils.py): update get_model_token_limit to handle exceptions and return None on error
fix(ciayn_agent.py): set default max_tokens to DEFAULT_TOKEN_LIMIT in CiaynAgent initialization
feat(models_tokens.py): define DEFAULT_TOKEN_LIMIT for consistent token limit management across agents
style(agent_utils.py): improve code formatting and consistency in function definitions and comments
style(agent_utils.py): refactor imports for better organization and readability
fix(test_agent_utils.py): correct test assertion to use state_modifier instead of messages_modifier for create_agent function

* refactor(agent_utils.py): improve docstring clarity and formatting for limit_tokens function to enhance readability
refactor(test_agent_utils.py): format test assertions for consistency and readability in agent creation tests

* feat: Update limit_tokens function to support Dict type for state parameter

* feat: Update limit_tokens to handle both list and dict input types

* refactor: Extract duplicate token trimming logic into helper function

* refactor: Rename and update message trimming functions for clarity

* refactor: Extract agent kwargs logic into a helper method for reuse

* refactor: Rename _build_agent_kwargs to build_agent_kwargs for clarity

* fix: Ensure state_modifier is passed correctly for agent creation

* test: Add tests for create_agent token limiting configuration

* refactor: Simplify CiaynAgent instantiation to only use max_tokens parameter

* refactor: Remove is_react_agent parameter from build_agent_kwargs function

* test: Fix test assertions for state_modifier in agent creation tests

* fix: Update agent creation to handle checkpointer and simplify tests

* test: Remove unnecessary assertions from agent creation test

* feat: Implement token limiting configuration for create_agent function

* refactor: Remove unused model info and token limit retrieval code

* test: Fix assertion errors in agent creation tests and update state_modifier handling

* test: Remove commented-out code and clarify assertions in tests

* test: Fix assertion in test_create_agent_anthropic_token_limiting_disabled

* feat(main.py): add --limit-tokens argument to control token limiting in agent state
fix(main.py): include limit_tokens in configuration to ensure proper state management

* test: Refactor agent creation tests for improved readability and consistency

* test: Modify error handling in create_agent test to use side_effect on get_model_token_limit

* test: Improve error handling in create_agent test to verify fallback behavior

* test: Trigger exception on get_model_token_limit in error handling test

* refactor(agent_utils.py): remove unused config parameter from create_agent function to simplify the function signature
fix(agent_utils.py): ensure config is always retrieved from _global_memory with a default value to prevent potential errors
test(tests/test_agent_utils.py): remove outdated test for create_agent error handling to clean up the test suite

* feat: Add debug print for agent_kwargs in create_agent function

* refactor: Replace lambda with inner function for state_modifier in agent_utils

* refactor: Simplify limit_tokens function to return only message sequences

* feat: Add debug print statements to show token trimming details in trim_messages

* PAIN

* feat(main.py): add debug print statement for args.chat to assist in troubleshooting chat mode
feat(agent_utils.py): implement estimate_messages_tokens function to calculate total tokens in messages
refactor(agent_utils.py): replace token counting logic in trim_messages_with_removal with estimate_messages_tokens for clarity
refactor(agent_utils.py): modify state_modifier to accept model and max_tokens parameters for better flexibility
refactor(agent_utils.py): update build_agent_kwargs to pass model to state_modifier for improved functionality

* feat: Add .direnvrc to manage Python virtual environment activation

* refactor: Update state_modifier to handle first message token count and trim messages

* chore: remove unused .direnvrc file to clean up project structure
feat: add .envrc to .gitignore to prevent environment configuration file from being tracked
fix: update help text for --disable-limit-tokens argument for clarity
refactor: clean up imports in agent_utils.py for better readability
refactor: remove unused functions and comments in agent_utils.py to streamline code
test: add unit tests for state_modifier function to ensure correct message trimming behavior

* refactor: Remove commented-out code in create_agent function

* feat: Add is_anthropic_claude method to check provider and model name

* fix: Correct search/replace block to match existing lines in agent_utils.py

* fix(main.py): update help text for --disable-limit-tokens argument to clarify it applies to react agents
refactor(agent_utils.py): streamline token limit retrieval and improve readability by removing redundant checks and restructuring code
refactor(agent_utils.py): modify build_agent_kwargs to use is_anthropic_claude for clarity and maintainability

* test: Update tests to pass config argument to get_model_token_limit()

* refactor(agent_utils.py): remove unnecessary print statements and improve function signatures for clarity
refactor(agent_utils.py): consolidate provider and model_name retrieval into config parameter for better maintainability

* test: Remove redundant token limiting tests from agent creation logic

* test: Refactor test_state_modifier to use mock_messages fixture

* test(tests): update test description for clarity on state_modifier behavior and use mock_messages for assertions to ensure consistency

* refactor(agent_utils.py): simplify token limit retrieval by removing unnecessary variable initialization and defaulting to None in get method

* chore(main.py): remove debug print statement for args.chat to clean up output
2025-01-20 14:41:29 -05:00
AI Christianson 0c39166172 Increase recusion limit; Handle 429 better; Improve prompts. 2025-01-09 15:52:51 -05:00
AI Christianson 63be5248e1 Extract tool reflection. 2025-01-09 15:35:14 -05:00
AI Christianson 8d0bacdcda Prompt improvements. 2025-01-09 15:18:33 -05:00
AI Christianson 5ffedb6941 Fix test_file_as_directory. 2025-01-09 15:04:21 -05:00
AI Christianson d01d2a4865 Integrate project info into chat prompt. 2025-01-09 15:01:39 -05:00
AI Christianson b631a4bf57 Get project info programmatically to save tokens. 2025-01-09 14:43:42 -05:00
AI Christianson 557ffd959b Prompt improvements. 2025-01-09 13:54:50 -05:00
AI Christianson 4b24dbe960 Improve work log handling. 2025-01-09 13:42:26 -05:00
AI Christianson ba82f41fa0 Only include work_log key if needed, to save tokens. 2025-01-09 12:57:58 -05:00
AI Christianson 094257e0af Add unit tests for CiaynAgent._does_not_conform_to_pattern. 2025-01-09 11:51:08 -05:00
AI Christianson 80d2d2fa60 Better handle 429 errors on openrouter. 2025-01-09 11:42:13 -05:00
AI Christianson d115b8d5fe Improve prompts for better open model support. 2025-01-09 11:06:58 -05:00
Benedikt Terhechte bfc0e9c626
Changes (#37)
* add way to extract tool use

* respect aiderignore for listing files

* properly use filetypes in ripgrep
2025-01-09 09:46:32 -05:00
AI Christianson 0449564109 Fix bug where directories are added as related files. 2025-01-08 17:04:24 -05:00
AI Christianson 4dd424ecc3 release: version 0.12.0 2025-01-04 15:42:31 -05:00
AI Christianson 7310f0244d docs: update CHANGELOG for unreleased changes 2025-01-04 15:40:32 -05:00
AI Christianson cd49c2bd48 test: update test suite for Gemini integration
- Add mock_gemini parameter to test functions
- Update Gemini API configuration tests
- Fix date-based assertions in directory listing tests
- Minor syntax fixes in test files
2025-01-04 15:36:13 -05:00
arthrod ffe5138a99
Adding Gemini API due to openrouter's limitations. (#34) 2025-01-04 07:19:05 -05:00
agentmarketbot 937c8c2a6a
agent bot commit (#31) 2025-01-02 16:41:02 -05:00
Jose M Leon dbfd4134da
FEAT add test coverage report (#28) 2025-01-01 09:36:03 -05:00
Jose M Leon 726b551449
FEAT add function to check for dependencies on startup (#27) 2025-01-01 09:35:41 -05:00
Guillermo Creus Botella 07c71408b7
Add default support for OpenAI models (#29)
* add support for default OpenAI provider

* clarify CLI options
2025-01-01 09:34:51 -05:00
AI Christianson 8e805dba6d SWEBench updates. 2024-12-31 08:51:21 -05:00
AI Christianson 4fca32a508 SWEBench updates. 2024-12-31 08:36:19 -05:00
AI Christianson 9303736418 Bump python version 2024-12-30 18:26:37 -05:00
AI Christianson bf86de2597 SWEBench updates. 2024-12-30 17:54:21 -05:00
AI Christianson 1e2917990e SWEBench updates. 2024-12-30 14:01:14 -05:00
AI Christianson 8b7eb76be6 SWEBench updates. 2024-12-30 13:25:51 -05:00
AI Christianson 34acb462f9 Version bump 2024-12-30 12:38:30 -05:00
Will ccb4756035
macOS compatibility (#23)
* Correcting URL for github; ra-aid.git -> RA.Aid.git

* Additional fix to cloning instructions

* Initial draft of tweaks to add macOS compatibility

* Changing LS test to check for not-zero instead of specific error code

* Further macOS compatibility tweaks - dealing with mystery control characters

* Additional compatibility for macOS - flag as macOS, and detect and change command based it

* Removing unneeded variable
2024-12-30 12:38:06 -05:00
AI Christianson 96c4620df0 Version bump 2024-12-30 08:51:10 -05:00
Jose M Leon 567d1ab49d
FIX SyntaxError: f-string expression part cannot include a backslash (#25)
* FIX unit tests

* FEAT run tests prior to git push

* FIX SyntaxError: f-string expression part cannot include a backslash
2024-12-30 08:45:21 -05:00
AI Christianson 712663b086 Version bump 2024-12-29 14:55:25 -05:00
AI Christianson a8084f15f9 Fix typo 2024-12-29 14:52:39 -05:00
Will d3a4684d69
Corrected typo in documentation for the GitHub URL (#22)
* Correcting URL for github; ra-aid.git -> RA.Aid.git

* Additional fix to cloning instructions
2024-12-29 11:47:24 -05:00
AI Christianson 9d4c74e05c Improve prompts. 2024-12-28 19:28:49 -05:00
AI Christianson 97b7fe0c45 Improve prompts. 2024-12-28 19:12:23 -05:00
AI Christianson 99d0b1f440 Improve prompts. 2024-12-28 19:12:00 -05:00
AI Christianson 595add4606 Version bump 2024-12-28 18:37:05 -05:00
AI Christianson a28ed59bca Add --temperature CLI parameter. 2024-12-28 18:36:24 -05:00
AI Christianson ace34633de Adjustments to get smaller agent models working better. 2024-12-28 18:19:42 -05:00
AI Christianson 35db6b633f Adjustments to get smaller agent models working better. 2024-12-28 17:41:06 -05:00
AI Christianson 8b50b741fa Fix test. 2024-12-28 17:36:31 -05:00
AI Christianson 684b076dbf Adjustments to get smaller agent models working better. 2024-12-28 17:31:41 -05:00
AI Christianson 19e203be7e Use create_react_agent for claude. 2024-12-28 17:19:12 -05:00
AI Christianson 87cd67715c Add note about env var validation improvements. 2024-12-28 16:59:28 -05:00