Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

Allow the `max_tokens` parameter to not be specified.

Daniel Pettib22120ed13a1
diff --git a/src/local_deep_research/config/llm_config.py b/src/local_deep_research/config/llm_config.py
index 22d4ad8f38..b28a24a5a0 100644
--- a/src/local_deep_research/config/llm_config.py
+++ b/src/local_deep_research/config/llm_config.py
@@ -2,6 +2,7 @@ import logging
import os
from pathlib import Path
+from dynaconf.vendor.box.exceptions import BoxKeyError
from langchain_anthropic import ChatAnthropic
from langchain_community.llms import VLLM
from langchain_ollama import ChatOllama
@@ -57,8 +58,13 @@ def get_llm(model_name=None, temperature=None, provider=None):
# Common parameters for all models
common_params = {
"temperature": temperature,
- "max_tokens": settings.llm.max_tokens,
}
+ try:
+ common_params["max_tokens"] = settings.llm.max_tokens
+ except BoxKeyError:
+ # Some providers don't support this parameter, in which case it can
+ # be omitted.
+ pass
# Handle different providers
if provider == "anthropic":