diff --git a/application/core/settings.py b/application/core/settings.py index 05a09510..2ff371af 100644 --- a/application/core/settings.py +++ b/application/core/settings.py @@ -35,6 +35,9 @@ class Settings(BaseSettings): ) RETRIEVERS_ENABLED: list = ["classic_rag", "duckduck_search"] # also brave_search AGENT_NAME: str = "classic" + FALLBACK_LLM_PROVIDER: Optional[str] = None # provider for fallback llm + FALLBACK_LLM_NAME: Optional[str] = None # model name for fallback llm + FALLBACK_LLM_API_KEY: Optional[str] = None # api key for fallback llm # LLM Cache CACHE_REDIS_URL: str = "redis://localhost:6379/2" diff --git a/application/llm/base.py b/application/llm/base.py index b145816d..cbce4ffd 100644 --- a/application/llm/base.py +++ b/application/llm/base.py @@ -72,7 +72,6 @@ class BaseLLM(ABC): logger.warning( f"Falling back to {self.fallback_provider}/{self.fallback_model_name}. Error: {str(e)}" ) - # Retry with fallback (without decorators for accurate token tracking) fallback_method = getattr( self.fallback_llm, method_name.replace("_raw_", "")