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
7 changes: 5 additions & 2 deletions livekit-agents/livekit/agents/evals/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def __init__(
llm: The LLM to use for evaluation. Can be an LLM instance or a model
string like "openai/gpt-4o-mini" (uses LiveKit inference gateway).
Model strings default to the lowest reasoning effort the model
supports; pass a configured LLM instance to override.
supports and to low inference priority; pass a configured LLM
instance to override.
judges: The judges to run during evaluation.
"""
if isinstance(llm, str):
Expand All @@ -120,7 +121,9 @@ def __init__(
if (effort := min_reasoning_effort(llm)) is not None:
extra_kwargs["reasoning_effort"] = effort

self._llm: LLM = InferenceLLM(llm, extra_kwargs=extra_kwargs)
# Judges run after the conversation, so no caller is waiting on them:
# they must not compete with live voice traffic for gateway quota.
self._llm: LLM = InferenceLLM(llm, inference_class="low", extra_kwargs=extra_kwargs)
else:
self._llm = llm

Expand Down
4 changes: 3 additions & 1 deletion livekit-agents/livekit/agents/inference/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ def min_reasoning_effort(model: str) -> ReasoningEffort | None:

LLMModels = OpenAIModels | GoogleModels | KimiModels | DeepSeekModels | ZAIModels | XAIModels

InferenceClass = Literal["priority", "standard"]
InferenceClass = Literal["priority", "standard", "low"]
"""Scheduling class for a request. ``low`` yields to voice traffic, so it is only
appropriate for work no caller is waiting on."""


class ChatCompletionOptions(TypedDict, total=False):
Expand Down