mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-28 18:19:28 +00:00
fix(deepseek): drop retired models from picker and provider defaults
Stop offering deepseek-chat/reasoner in the static catalog and point fallback/aux defaults at the permanent v4 IDs. Keep retired aliases in a detection-only map so /model deepseek-chat still resolves to deepseek.
This commit is contained in:
parent
cc7c418b33
commit
aff48958d3
4 changed files with 60 additions and 36 deletions
|
|
@ -1,11 +1,11 @@
|
|||
"""DeepSeek provider profile.
|
||||
|
||||
DeepSeek's V4 family (and the legacy ``deepseek-reasoner``) defaults to
|
||||
thinking-mode ON when ``extra_body.thinking`` is unset. The API then returns
|
||||
``reasoning_content`` and starts enforcing the contract that subsequent turns
|
||||
echo it back; combined with how Hermes replays history this lands on the
|
||||
notorious HTTP 400 ``reasoning_content must be passed back`` error after the
|
||||
first tool call (#15700, #17212, #17825).
|
||||
DeepSeek's V4 family defaults to thinking-mode ON when ``extra_body.thinking``
|
||||
is unset. The API then returns ``reasoning_content`` and starts enforcing
|
||||
the contract that subsequent turns echo it back; combined with how Hermes
|
||||
replays history this lands on the notorious HTTP 400
|
||||
``reasoning_content must be passed back`` error after the first tool call
|
||||
(#15700, #17212, #17825).
|
||||
|
||||
This profile overrides :meth:`build_api_kwargs_extras` to mirror the Kimi /
|
||||
Moonshot wire shape that DeepSeek's OpenAI-compat endpoint expects:
|
||||
|
|
@ -13,8 +13,12 @@ Moonshot wire shape that DeepSeek's OpenAI-compat endpoint expects:
|
|||
{"reasoning_effort": "<low|medium|high|max>",
|
||||
"extra_body": {"thinking": {"type": "enabled" | "disabled"}}}
|
||||
|
||||
Non-thinking models (only ``deepseek-chat`` today, which is V3) are left as
|
||||
no-ops so we don't perturb the V3 wire format.
|
||||
Non-thinking models (``deepseek-v3-*`` variants) are left as no-ops so we
|
||||
don't perturb the V3 wire format.
|
||||
|
||||
The legacy aliases ``deepseek-chat`` / ``deepseek-reasoner`` were retired on
|
||||
2026-07-24. Use ``deepseek-v4-flash`` or ``deepseek-v4-pro``; Hermes remaps
|
||||
the retired IDs in ``hermes_cli.model_normalize``.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
@ -29,8 +33,8 @@ def _model_supports_thinking(model: str | None) -> bool:
|
|||
"""DeepSeek thinking-capable model families.
|
||||
|
||||
Currently covers the V4 family (``deepseek-v4-pro``, ``deepseek-v4-flash``,
|
||||
and any future ``deepseek-v4-*`` variants) and the legacy
|
||||
``deepseek-reasoner`` (R1). ``deepseek-chat`` is V3 with no thinking mode.
|
||||
and any future ``deepseek-v4-*`` variants). Retired aliases are remapped
|
||||
before requests leave Hermes, so they are not listed here.
|
||||
"""
|
||||
m = (model or "").strip().lower()
|
||||
if not m:
|
||||
|
|
@ -39,8 +43,6 @@ def _model_supports_thinking(model: str | None) -> bool:
|
|||
# deepseek-v4-*, deepseek-v5-*, etc. — every V4+ generation has
|
||||
# thinking. v3 explicitly excluded.
|
||||
return True
|
||||
if m == "deepseek-reasoner":
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
|
|
@ -90,11 +92,11 @@ deepseek = DeepSeekProfile(
|
|||
description="DeepSeek — native DeepSeek API",
|
||||
signup_url="https://platform.deepseek.com/",
|
||||
fallback_models=(
|
||||
"deepseek-chat",
|
||||
"deepseek-reasoner",
|
||||
"deepseek-v4-pro",
|
||||
"deepseek-v4-flash",
|
||||
),
|
||||
base_url="https://api.deepseek.com/v1",
|
||||
default_aux_model="deepseek-chat",
|
||||
default_aux_model="deepseek-v4-flash",
|
||||
)
|
||||
|
||||
register_provider(deepseek)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue