-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Customize LLM config per agent (#2756)
Currently, OpenDevin uses a global singleton LLM config and a global singleton agent config. This PR allows customers to configure an LLM config for each agent. A hypothetically useful scenario is to use a cheaper LLM for repo exploration / code search, and a more powerful LLM to actually do the problem solving (CodeActAgent). Partially solves #2075 (web GUI improvement is not the goal of this PR)
- Loading branch information
Showing
35 changed files
with
522 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
sidebar_position: 8 | ||
--- | ||
|
||
# Changelog | ||
|
||
## 0.8 (release date: ??) | ||
|
||
### Config breaking changes | ||
|
||
In this release we introduced a few breaking changes to backend configurations. | ||
If you have only been using OpenDevin via frontend (web GUI), nothing needs | ||
to be taken care of. | ||
|
||
Here's a list of breaking changes in configs. They only apply to users who | ||
use OpenDevin CLI via `main.py`. For more detail, see [#2756](https://github.com/OpenDevin/OpenDevin/pull/2756). | ||
|
||
#### Removal of --model-name option from main.py | ||
|
||
Please note that `--model-name`, or `-m` option, no longer exists. You should set up the LLM | ||
configs in `config.toml` or via environmental variables. | ||
|
||
#### LLM config groups must be subgroups of 'llm' | ||
|
||
Prior to release 0.8, you can use arbitrary name for llm config in `config.toml`, e.g. | ||
|
||
```toml | ||
[gpt-4o] | ||
model="gpt-4o" | ||
api_key="<your_api_key>" | ||
``` | ||
|
||
and then use `--llm-config` CLI argument to specify the desired LLM config group | ||
by name. This no longer works. Instead, the config group must be under `llm` group, | ||
e.g.: | ||
|
||
```toml | ||
[llm.gpt-4o] | ||
model="gpt-4o" | ||
api_key="<your_api_key>" | ||
``` | ||
|
||
If you have a config group named `llm`, no need to change it, it will be used | ||
as the default LLM config group. | ||
|
||
#### 'agent' group no longer contains 'name' field | ||
|
||
Prior to release 0.8, you may or may not have a config group named `agent` that | ||
looks like this: | ||
|
||
```toml | ||
[agent] | ||
name="CodeActAgent" | ||
memory_max_threads=2 | ||
``` | ||
|
||
Note the `name` field is now removed. Instead, you should put `default_agent` field | ||
under `core` group, e.g. | ||
|
||
```toml | ||
[core] | ||
# other configs | ||
default_agent='CodeActAgent' | ||
|
||
[agent] | ||
llm_config='llm' | ||
memory_max_threads=2 | ||
|
||
[agent.CodeActAgent] | ||
llm_config='gpt-4o' | ||
``` | ||
|
||
Note that similar to `llm` subgroups, you can also define `agent` subgroups. | ||
Moreover, an agent can be associated with a specific LLM config group. For more | ||
detail, see the examples in `config.template.toml`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.