OpenHands supports defining multiple named LLM configurations in your config.toml
file. This feature allows you to use different LLM configurations for different purposes, such as using a cheaper model for tasks that don’t require high-quality responses, or using different models with different parameters for specific agents.
config.toml
file using sections that start with llm.
. For example:
[llm]
section and can override any of those settings. You can define as many custom configurations as needed.
llm_config
parameter in the agent’s configuration section:
model
)api_key
, base_url
, etc.)temperature
, top_p
, etc.)num_retries
, retry_multiplier
, etc.)max_input_tokens
, max_output_tokens
)draft_editor
configuration is a group of settings you can provide, to specify the model to use for preliminary drafting of code edits, for any tasks that involve editing and refining code. You need to provide it under the section [llm.draft_editor]
.
For example, you can define in config.toml
a draft editor like this:
main.py
or cli.py
. When running via docker run
, please use the standard configuration options.