Skip to content

Commit baf361f

Browse files
authored
Merge pull request #1712 from qodo-ai/tr/multi_model
Update model references from o3-mini to o4-mini and add Gemini models
2 parents ca88ec9 + 4ac0aa5 commit baf361f

File tree

5 files changed

+38
-18
lines changed

5 files changed

+38
-18
lines changed

docs/docs/overview/pr_agent_pro.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ Qodo Merge is designed for companies and teams that require additional features
1717

1818
Here are some of the additional features and capabilities that Qodo Merge offers:
1919

20-
| Feature | Description |
21-
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22-
| [**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` |
23-
| [**Global and wiki configuration**](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/) | Control configurations for many repositories from a single location; <br>Edit configuration of a single repo without committing code |
24-
| [**Apply suggestions**](https://qodo-merge-docs.qodo.ai/tools/improve/#overview) | Generate committable code from the relevant suggestions interactively by clicking on a checkbox |
20+
| Feature | Description |
21+
| -------------------------------------------------------------------------------------------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------|
22+
| [**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` |
23+
| [**Global and wiki configuration**](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/) | Control configurations for many repositories from a single location; <br>Edit configuration of a single repo without committing code |
24+
| [**Apply suggestions**](https://qodo-merge-docs.qodo.ai/tools/improve/#overview) | Generate committable code from the relevant suggestions interactively by clicking on a checkbox |
2525
| [**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 |
26-
| [**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 |
27-
| [**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 |
28-
| [**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 |
29-
| [**Interactive triggering**](https://qodo-merge-docs.qodo.ai/tools/analyze/#example-usage) | Interactively apply different tools via the `analyze` command |
30-
| [**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 |
26+
| [**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 |
27+
| [**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 |
28+
| [**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 |
29+
| [**Interactive triggering**](https://qodo-merge-docs.qodo.ai/tools/analyze/#example-usage) | Interactively apply different tools via the `analyze` command |
30+
| [**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 |
3131

3232
### Additional tools
3333

docs/docs/usage-guide/qodo_merge_models.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,44 @@ Users can configure Qodo Merge to use a specific model by editing the [configura
77
The models supported by Qodo Merge are:
88

99
- `claude-3-7-sonnet` (default)
10-
- `o3-mini`
10+
- `o4-mini`
1111
- `gpt-4.1`
12+
- `gemini-2.5-pro`
13+
- `gemini-2.5-flash`
1214
- `deepseek/r1`
1315

14-
To restrict Qodo Merge to using only `o3-mini`, add this setting:
16+
To restrict Qodo Merge to using only `o4-mini`, add this setting:
1517

16-
```
18+
```toml
1719
[config]
18-
model="o3-mini"
20+
model="o4-mini"
1921
```
2022

2123
To restrict Qodo Merge to using only `GPT-4.1`, add this setting:
2224

23-
```
25+
```toml
2426
[config]
2527
model="gpt-4.1"
2628
```
2729

28-
To restrict Qodo Merge to using only `deepseek-r1` us-hosted, add this setting:
30+
To restrict Qodo Merge to using only `gemini-2.5-pro`, add this setting:
31+
32+
```toml
33+
[config]
34+
model="gemini-2.5-pro"
35+
```
2936

37+
To restrict Qodo Merge to using only `gemini-2.5-flash`, add this setting:
38+
39+
```toml
40+
[config]
41+
model="gemini-2.5-flash"
3042
```
43+
44+
45+
To restrict Qodo Merge to using only `deepseek-r1` us-hosted, add this setting:
46+
47+
```toml
3148
[config]
3249
model="deepseek/r1"
3350
```

pr_agent/algo/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@
5757
'vertex_ai/claude-3-5-sonnet-v2@20241022': 100000,
5858
'vertex_ai/claude-3-7-sonnet@20250219': 200000,
5959
'vertex_ai/gemini-1.5-pro': 1048576,
60+
'vertex_ai/gemini-2.5-pro-preview-03-25': 1048576,
6061
'vertex_ai/gemini-1.5-flash': 1048576,
6162
'vertex_ai/gemini-2.0-flash': 1048576,
63+
'vertex_ai/gemini-2.5-flash-preview-04-17': 1048576,
6264
'vertex_ai/gemma2': 8200,
6365
'gemini/gemini-1.5-pro': 1048576,
6466
'gemini/gemini-1.5-flash': 1048576,

pr_agent/algo/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ def get_max_tokens(model):
878878
elif settings.config.custom_model_max_tokens > 0:
879879
max_tokens_model = settings.config.custom_model_max_tokens
880880
else:
881+
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")
881882
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")
882883

883884
if settings.config.max_model_tokens and settings.config.max_model_tokens > 0:

pr_agent/settings/configuration.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
[config]
88
# models
99
model="o4-mini"
10-
fallback_models=["gpt-4o-2024-11-20"]
11-
#model_weak="gpt-4o-mini-2024-07-18" # optional, a weaker model to use for some easier tasks
10+
fallback_models=["gpt-4.1"]
11+
#model_weak="gpt-4o" # optional, a weaker model to use for some easier tasks
1212
# CLI
1313
git_provider="github"
1414
publish_output=true

0 commit comments

Comments
 (0)