diff --git a/docs/docs/overview/pr_agent_pro.md b/docs/docs/overview/pr_agent_pro.md index 44b4bd75..02a6081f 100644 --- a/docs/docs/overview/pr_agent_pro.md +++ b/docs/docs/overview/pr_agent_pro.md @@ -17,17 +17,17 @@ Qodo Merge is designed for companies and teams that require additional features Here are some of the additional features and capabilities that Qodo Merge offers: -| Feature | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [**Model selection**](https://qodo-merge-docs.qodo.ai/usage-guide/PR_agent_pro_models/) | Choose the model that best fits your needs, among top models like `Claude Sonnet` and `o3-mini` | -| [**Global and wiki configuration**](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/) | Control configurations for many repositories from a single location;
Edit configuration of a single repo without committing code | -| [**Apply suggestions**](https://qodo-merge-docs.qodo.ai/tools/improve/#overview) | Generate committable code from the relevant suggestions interactively by clicking on a checkbox | +| Feature | Description | +| -------------------------------------------------------------------------------------------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------| +| [**Model selection**](https://qodo-merge-docs.qodo.ai/usage-guide/PR_agent_pro_models/) | Choose the model that best fits your needs, among top models like `Claude Sonnet`, `o4-mini` | +| [**Global and wiki configuration**](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/) | Control configurations for many repositories from a single location;
Edit configuration of a single repo without committing code | +| [**Apply suggestions**](https://qodo-merge-docs.qodo.ai/tools/improve/#overview) | Generate committable code from the relevant suggestions interactively by clicking on a checkbox | | [**Suggestions impact**](https://qodo-merge-docs.qodo.ai/tools/improve/#assessing-impact) | Automatically mark suggestions that were implemented by the user (either directly in GitHub, or indirectly in the IDE) to enable tracking of the impact of the suggestions | -| [**CI feedback**](https://qodo-merge-docs.qodo.ai/tools/ci_feedback/) | Automatically analyze failed CI checks on GitHub and provide actionable feedback in the PR conversation, helping to resolve issues quickly | -| [**Advanced usage statistics**](https://www.codium.ai/contact/#/) | Qodo Merge offers detailed statistics at user, repository, and company levels, including metrics about Qodo Merge usage, and also general statistics and insights | -| [**Incorporating companies' best practices**](https://qodo-merge-docs.qodo.ai/tools/improve/#best-practices) | Use the companies' best practices as reference to increase the effectiveness and the relevance of the code suggestions | -| [**Interactive triggering**](https://qodo-merge-docs.qodo.ai/tools/analyze/#example-usage) | Interactively apply different tools via the `analyze` command | -| [**Custom labels**](https://qodo-merge-docs.qodo.ai/tools/describe/#handle-custom-labels-from-the-repos-labels-page) | Define custom labels for Qodo Merge to assign to the PR | +| [**CI feedback**](https://qodo-merge-docs.qodo.ai/tools/ci_feedback/) | Automatically analyze failed CI checks on GitHub and provide actionable feedback in the PR conversation, helping to resolve issues quickly | +| [**Advanced usage statistics**](https://www.codium.ai/contact/#/) | Qodo Merge offers detailed statistics at user, repository, and company levels, including metrics about Qodo Merge usage, and also general statistics and insights | +| [**Incorporating companies' best practices**](https://qodo-merge-docs.qodo.ai/tools/improve/#best-practices) | Use the companies' best practices as reference to increase the effectiveness and the relevance of the code suggestions | +| [**Interactive triggering**](https://qodo-merge-docs.qodo.ai/tools/analyze/#example-usage) | Interactively apply different tools via the `analyze` command | +| [**Custom labels**](https://qodo-merge-docs.qodo.ai/tools/describe/#handle-custom-labels-from-the-repos-labels-page) | Define custom labels for Qodo Merge to assign to the PR | ### Additional tools diff --git a/docs/docs/usage-guide/qodo_merge_models.md b/docs/docs/usage-guide/qodo_merge_models.md index 2adc04f1..cb062cb9 100644 --- a/docs/docs/usage-guide/qodo_merge_models.md +++ b/docs/docs/usage-guide/qodo_merge_models.md @@ -7,27 +7,44 @@ Users can configure Qodo Merge to use a specific model by editing the [configura The models supported by Qodo Merge are: - `claude-3-7-sonnet` (default) -- `o3-mini` +- `o4-mini` - `gpt-4.1` +- `gemini-2.5-pro` +- `gemini-2.5-flash` - `deepseek/r1` -To restrict Qodo Merge to using only `o3-mini`, add this setting: +To restrict Qodo Merge to using only `o4-mini`, add this setting: -``` +```toml [config] -model="o3-mini" +model="o4-mini" ``` To restrict Qodo Merge to using only `GPT-4.1`, add this setting: -``` +```toml [config] model="gpt-4.1" ``` +To restrict Qodo Merge to using only `gemini-2.5-pro`, add this setting: + +```toml +[config] +model="gemini-2.5-pro" +``` + +To restrict Qodo Merge to using only `gemini-2.5-flash`, add this setting: + +```toml +[config] +model="gemini-2.5-flash" +``` + + To restrict Qodo Merge to using only `deepseek-r1` us-hosted, add this setting: -``` +```toml [config] model="deepseek/r1" ``` diff --git a/pr_agent/algo/__init__.py b/pr_agent/algo/__init__.py index e3abb93c..8d805baf 100644 --- a/pr_agent/algo/__init__.py +++ b/pr_agent/algo/__init__.py @@ -57,8 +57,10 @@ MAX_TOKENS = { 'vertex_ai/claude-3-5-sonnet-v2@20241022': 100000, 'vertex_ai/claude-3-7-sonnet@20250219': 200000, 'vertex_ai/gemini-1.5-pro': 1048576, + 'vertex_ai/gemini-2.5-pro-preview-03-25': 1048576, 'vertex_ai/gemini-1.5-flash': 1048576, 'vertex_ai/gemini-2.0-flash': 1048576, + 'vertex_ai/gemini-2.5-flash-preview-04-17': 1048576, 'vertex_ai/gemma2': 8200, 'gemini/gemini-1.5-pro': 1048576, 'gemini/gemini-1.5-flash': 1048576, diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py index 4e42332f..398df4c3 100644 --- a/pr_agent/algo/utils.py +++ b/pr_agent/algo/utils.py @@ -878,6 +878,7 @@ def get_max_tokens(model): elif settings.config.custom_model_max_tokens > 0: max_tokens_model = settings.config.custom_model_max_tokens else: + get_logger().error(f"Model {model} is not defined in MAX_TOKENS in ./pr_agent/algo/__init__.py and no custom_model_max_tokens is set") raise Exception(f"Ensure {model} is defined in MAX_TOKENS in ./pr_agent/algo/__init__.py or set a positive value for it in config.custom_model_max_tokens") if settings.config.max_model_tokens and settings.config.max_model_tokens > 0: diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml index edb5296f..02bc7311 100644 --- a/pr_agent/settings/configuration.toml +++ b/pr_agent/settings/configuration.toml @@ -7,8 +7,8 @@ [config] # models model="o4-mini" -fallback_models=["gpt-4o-2024-11-20"] -#model_weak="gpt-4o-mini-2024-07-18" # optional, a weaker model to use for some easier tasks +fallback_models=["gpt-4.1"] +#model_weak="gpt-4o" # optional, a weaker model to use for some easier tasks # CLI git_provider="github" publish_output=true