Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions backend/app/models/llm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
],
}

# OpenAI models that support reasoning (effort parameter)
OPENAI_REASONING_MODELS: set[str] = {"o1", "o1-preview", "o1-mini"}

SUPPORTED_VOICES = {
("google", "tts"): ["Kore", "Orus", "Leda", "Charon"],
("sarvamai", "tts"): ["simran", "shubh", "roopa"],
Expand Down
4 changes: 2 additions & 2 deletions backend/app/services/llm/mappers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import litellm
import logging

from app.models.llm import KaapiCompletionConfig, NativeCompletionConfig
Expand All @@ -7,6 +6,7 @@
BCP47_TO_ELEVENLABS_LANG,
ELEVENLABS_VOICE_TO_ID,
DEFAULT_TTS_VOICE,
OPENAI_REASONING_MODELS,
)

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -67,7 +67,7 @@ def map_kaapi_to_openai_params(kaapi_params: dict) -> tuple[dict, list[str]]:
knowledge_base_ids = kaapi_params.get("knowledge_base_ids")
max_num_results = kaapi_params.get("max_num_results")

support_reasoning = litellm.supports_reasoning(model=f"openai/{model}")
support_reasoning = model in OPENAI_REASONING_MODELS

# Handle reasoning vs temperature mutual exclusivity
if support_reasoning:
Expand Down
2 changes: 2 additions & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ override-dependencies = [
"cryptography>=46.0.5",
"werkzeu>=3.1.6",
"pypdf>=3.9.0",
# Pinned: avoid supply chain attack in litellm 1.82.7/1.82.8 (Mar 2026)
"litellm==1.82.1",
]
dev-dependencies = [
"pytest<8.0.0,>=7.4.3",
Expand Down
3 changes: 2 additions & 1 deletion backend/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading