refactor(fallback_handler.py): change failed_messages from set to list for ordered message handling
refactor(fallback_handler.py): update handle_failure method to accept ToolExecutionError type for better type safety
refactor(fallback_handler.py): implement _reset_on_new_failure method to encapsulate failure reset logic
feat(fallback_handler.py): add construct_prompt_msg_list method to create structured message list for fallback tool calls
feat(fallback_handler.py): enhance handle_failure method to extract tool name from ToolExecutionError and improve fallback logic
fix(exceptions.py): update ToolExecutionError to include base_message for better error context
feat(output.py): add base_message to ToolExecutionError for improved debugging
chore(tool_configs.py): update get_all_tools function to specify return type
style(logging_config.py): reorder imports for consistency
test(tests): add tests for new error handling and fallback logic in agent_utils and fallback_handler
refactor(fallback_handler.py): extract tool call extraction logic into a separate method for better organization and maintainability
refactor(fallback_handler.py): introduce _parse_tool_arguments method to handle argument parsing, improving code clarity and reusability
refactor(fallback): streamline fallback model selection and invocation process for improved maintainability
fix(config): reduce maximum tool failures from 3 to 2 to tighten error handling thresholds
style(console): improve error message formatting and logging for better clarity and debugging
chore(main): remove redundant fallback tool model handling from main function to simplify configuration management
feat(agent_utils.py): add new helper functions for handling API errors and managing interrupt signals
fix(agent_utils.py): improve error handling in tool execution and retry logic
feat(fallback_handler.py): enhance fallback handling by binding tools correctly during retries
test(tests): add unit tests for new helper functions and refactored logic in agent_utils.py
to configure retry behavior for fallback models
refactor(fallback_handler.py): enhance fallback handling logic to
support both prompt-based and function-calling fallbacks with retries
fix(fallback_handler.py): update fallback model selection to return
dictionaries for better structure and access to model properties
refactor(ciayn_agent): integrate FallbackHandler into CiaynAgent for improved failure handling
fix(agent_utils): add missing newline for better readability in run_agent_with_retry function
test(fallback_handler): add unit tests for FallbackHandler to ensure correct failure handling and fallback logic
refactor(ciayn_agent): restructure tool failure handling to track consecutive failures and fallback attempts more effectively
fix(logging): add pretty logging option for improved log readability
chore(config): define valid providers for LLM selection and update fallback model loading logic
test(ciayn_agent): add unit tests for fallback logic and tool failure handling to ensure reliability and correctness
feat(ciayn_agent): implement fallback mechanism in CiaynAgent to handle tool call failures and switch to alternative models
feat(__main__): add command line arguments for fallback configuration in the main application
feat(llm): add validation for required environment variables for LLM providers and merge chat histories during fallback
fix(config): define default values for maximum tool failures in configuration
test(ciayn_agent): add unit tests for fallback logic and tool call execution with retries and error handling
test(llm): enhance tests for LLM initialization and environment variable validation