From c5797d1d5a4ebe5a8c92f859943d27f07660aa25 Mon Sep 17 00:00:00 2001 From: Engel Nyst Date: Wed, 15 Jan 2025 02:17:37 +0100 Subject: [PATCH] Fix llm_config fallback (#4415) Co-authored-by: openhands --- docs/modules/usage/configuration-options.md | 6 +- docs/modules/usage/llms/custom-llm-configs.md | 106 ++++++++ openhands/core/config/llm_config.py | 19 +- openhands/core/config/utils.py | 49 +++- tests/unit/test_llm_config.py | 228 ++++++++++++++++++ tests/unit/test_llm_draft_config.py | 92 +++++++ 6 files changed, 489 insertions(+), 11 deletions(-) create mode 100644 docs/modules/usage/llms/custom-llm-configs.md create mode 100644 tests/unit/test_llm_config.py create mode 100644 tests/unit/test_llm_draft_config.py diff --git a/docs/modules/usage/configuration-options.md b/docs/modules/usage/configuration-options.md index 136d88e431..b2fd2d663a 100644 --- a/docs/modules/usage/configuration-options.md +++ b/docs/modules/usage/configuration-options.md @@ -140,7 +140,11 @@ The LLM (Large Language Model) configuration options are defined in the `[llm]` To use these with the docker command, pass in `-e LLM_