Skip to content
Closed
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
9 changes: 9 additions & 0 deletions agent/auxiliary_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ def _is_arcee_trinity_thinking(model: Optional[str]) -> bool:
bare = (model or "").strip().lower().rsplit("/", 1)[-1]
return bare == "trinity-large-thinking"

def _is_deepseek_model(model: Optional[str]) -> bool:
"""True for DeepSeek V4 models (v4-pro, v4-flash)."""
bare = (model or "").strip().lower().rsplit("/", 1)[-1]
return bare.startswith("deepseek-v4")


# Context window enforced by ChatGPT's Codex OAuth backend for gpt-5.5.
# The raw OpenAI API and OpenRouter expose 1.05M for the same slug, but the
Expand Down Expand Up @@ -250,6 +255,10 @@ def _fixed_temperature_for_model(
return OMIT_TEMPERATURE
if _is_arcee_trinity_thinking(model):
return 0.5
if _is_deepseek_model(model):
# DeepSeek defaults to 1.0 which is far too hot for agent/tool-use tasks.
# 0.0 gives deterministic outputs critical for reliable tool selection.
return 0.0
return None


Expand Down
1 change: 1 addition & 0 deletions plugins/model-providers/deepseek/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def build_api_kwargs_extras(


deepseek = DeepSeekProfile(
fixed_temperature=0.0,
name="deepseek",
aliases=("deepseek-chat",),
env_vars=("DEEPSEEK_API_KEY",),
Expand Down