Codium-ai / cover-agent

QodoAI Cover-Agent: An AI-Powered Tool for Automated Test Generation and Code Coverage Enhancement! ๐Ÿ’ป๐Ÿค–๐Ÿงช๐Ÿž
https://qodo.ai/
GNU Affero General Public License v3.0
4.37k stars 327 forks source link

Update LLM dependencies in pyproject.toml to latest versions #197

Closed mrT23 closed 3 weeks ago

mrT23 commented 3 weeks ago

User description

Update litellm and openai to latest versions.

This will enable us to work better with top code models like 'o1' and 'Claude sonnet'

@EmbeddedDevops1 I synced to latest version of litellm, with our fix that solved a compilation problem


PR Type

dependencies


Description


PRDescriptionHeader.CHANGES_WALKTHROUGH

Relevant files
Dependencies
pyproject.toml
Update LLM and related dependencies to latest versions     

pyproject.toml
  • Updated litellm dependency to version ^1.50.2.
  • Updated openai dependency to version ^1.52.1.
  • Updated tiktoken dependency to version ^0.8.0.
  • Downgraded boto3 dependency to version ^1.33.6.
  • +4/-4     

    ๐Ÿ’ก PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    mrT23 commented 3 weeks ago

    /improve

    codiumai-pr-agent-pro[bot] commented 3 weeks ago

    PR Code Suggestions โœจ

    Latest suggestions up to eea618e

    CategorySuggestion                                                                                                                                    Score
    Maintainability
    Add upper bounds to version constraints to prevent potential breaking changes ___ **Consider adding upper bounds to the version constraints to prevent potential
    breaking changes in future major releases.** [pyproject.toml [22-24]](https://github.com/Codium-ai/cover-agent/pull/197/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R22-R24) ```diff -litellm = "^1.50.2" -openai = "^1.52.1" -tiktoken = "^0.8.0" +litellm = "^1.50.2,<2.0.0" +openai = "^1.52.1,<2.0.0" +tiktoken = "^0.8.0,<0.9.0" ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 8 Why: Adding upper bounds to version constraints is a good practice to prevent potential breaking changes from future major releases. This suggestion enhances the stability and reliability of the project by ensuring compatibility with future updates.
    8
    Best practice
    Use version ranges for dependencies to allow automatic minor updates and patches ___ **Consider using version ranges instead of exact versions for the LLM dependencies to
    allow for minor updates and patches automatically.** [pyproject.toml [22-24]](https://github.com/Codium-ai/cover-agent/pull/197/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R22-R24) ```diff -litellm = "^1.50.2" -openai = "^1.52.1" -tiktoken = "^0.8.0" +litellm = "^1.50" +openai = "^1.52" +tiktoken = "^0.8" ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: The suggestion to use version ranges instead of exact versions is valid as it allows for automatic updates to minor versions and patches, which can improve maintainability and reduce manual updates. However, it may not be suitable for all projects, depending on the stability of the dependencies.
    7

    Previous suggestions

    โœ… Suggestions up to commit 1966e62
    CategorySuggestion                                                                                                                                    Score
    Possible issue
    โœ… Verify the intentional downgrade of a dependency version and its potential impact on the project ___
    Suggestion Impact:The suggestion highlighted the need to verify the downgrade of the boto3 version, which was then reverted in the commit, indicating the suggestion's impact. code diff: ```diff -boto3 = "^1.33.6" +boto3 = "^1.34.121" ```
    ___ **The boto3 version has been downgraded from 1.34.121 to 1.33.6. Verify if this
    downgrade is intentional and doesn't introduce compatibility issues with other
    dependencies or break existing functionality.** [pyproject.toml [25]](https://github.com/Codium-ai/cover-agent/pull/197/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R25-R25) ```diff -boto3 = "^1.33.6" +boto3 = "^1.34.121" ```
    Suggestion importance[1-10]: 8 Why: This suggestion is important as it highlights a potential issue with downgrading the boto3 version, which could lead to compatibility problems or break existing functionality. Verifying the downgrade's intent and impact is crucial for maintaining project stability.
    8
    codiumai-pr-agent-pro[bot] commented 3 weeks ago

    CI Failure Feedback ๐Ÿง

    (Checks updated until commit https://github.com/Codium-ai/cover-agent/commit/f446f233e855f0ac40b1748d5816b373f663a488)

    **Action:** build (macos-latest)
    **Failed stage:** [Test Executable (Unix)](https://github.com/Codium-ai/cover-agent/actions/runs/11576769872/job/32227897455) [โŒ]
    **Failure summary:** The action failed because there was an unhandled exception during the execution of the script
    'main'.
  • The specific error was a NameError indicating that the name json_data is not defined.
  • This error occurred in the file litellm/utils.py at line 149.
  • Relevant error logs: ```yaml 1: ##[group]Operating System 2: macOS ... 722: pythonLocation: /Users/runner/hostedtoolcache/Python/3.12.7/arm64 723: ##[endgroup] 724: poetry run pyinstaller \ 725: --add-data "cover_agent/version.txt:." \ 726: --add-data "cover_agent/settings/language_extensions.toml:." \ 727: --add-data "cover_agent/settings/test_generation_prompt.toml:." \ 728: --add-data "cover_agent/settings/analyze_suite_test_headers_indentation.toml:." \ 729: --add-data "cover_agent/settings/analyze_suite_test_insert_line.toml:." \ 730: --add-data "cover_agent/settings/analyze_test_run_failure.toml:." \ ... 913: File "", line 935, in _load_unlocked 914: File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module 915: File "litellm/llms/anthropic/cost_calculation.py", line 9, in 916: File "", line 1360, in _find_and_load 917: File "", line 1331, in _find_and_load_unlocked 918: File "", line 935, in _load_unlocked 919: File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module 920: File "litellm/utils.py", line 149, in 921: NameError: name 'json_data' is not defined 922: [PYI-2528:ERROR] Failed to execute script 'main' due to unhandled exception! 923: ##[error]Process completed with exit code 1. ```

    โœจ CI feedback usage guide:
    The CI feedback tool (`/checks)` automatically triggers when a PR has a failed check. The tool analyzes the failed checks and provides several feedbacks: - Failed stage - Failed test name - Failure summary - Relevant error logs In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR: ``` /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}" ``` where `{repo_name}` is the name of the repository, `{run_number}` is the run number of the failed check, and `{job_number}` is the job number of the failed check. #### Configuration options - `enable_auto_checks_feedback` - if set to true, the tool will automatically provide feedback when a check is failed. Default is true. - `excluded_checks_list` - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list. - `enable_help_text` - if set to true, the tool will provide a help message with the feedback. Default is true. - `persistent_comment` - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true. - `final_update_message` - if `persistent_comment` is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true. See more information about the `checks` tool in the [docs](https://pr-agent-docs.codium.ai/tools/ci_feedback/).