diff --git a/rdagent/oai/backend/litellm.py b/rdagent/oai/backend/litellm.py index 252ab0ac..250aa88a 100644 --- a/rdagent/oai/backend/litellm.py +++ b/rdagent/oai/backend/litellm.py @@ -88,6 +88,7 @@ class LiteLLMAPIBackend(APIBackend): stream=LITELLM_SETTINGS.chat_stream, temperature=LITELLM_SETTINGS.chat_temperature, max_tokens=LITELLM_SETTINGS.chat_max_tokens, + reasoning_effort=LITELLM_SETTINGS.reasoning_effort, **kwargs, ) logger.info( diff --git a/rdagent/oai/llm_conf.py b/rdagent/oai/llm_conf.py index fcd6e350..474e8025 100644 --- a/rdagent/oai/llm_conf.py +++ b/rdagent/oai/llm_conf.py @@ -1,6 +1,7 @@ from __future__ import annotations from pathlib import Path +from typing import Literal from pydantic import Field @@ -14,6 +15,8 @@ class LLMSettings(ExtendedBaseSettings): chat_model: str = "gpt-4-turbo" embedding_model: str = "text-embedding-3-small" + reasoning_effort: Literal["low", "medium", "high"] | None = None + # TODO: most of the settings are only used on deprec.DeprecBackend. # So they should move the settings to that folder.