fix(agent): clamp auxiliary ultra reasoning effort
This commit is contained in:
@@ -6157,7 +6157,14 @@ def _merge_aux_extra_body(
|
||||
if reasoning_config.get("enabled") is False:
|
||||
merged_extra["reasoning"] = {"enabled": False}
|
||||
else:
|
||||
merged_extra["reasoning"] = {"enabled": True, "effort": reasoning_config.get("effort") or "medium"}
|
||||
# This fallback uses the OpenAI-compatible chat-completions wire. Hermes'
|
||||
# internal ``ultra`` tier is not accepted there, including for MoA slots.
|
||||
from agent.reasoning_effort import OPENAI_COMPAT_WIRE_EFFORTS, clamp_effort
|
||||
effort = reasoning_config.get("effort") or "medium"
|
||||
merged_extra["reasoning"] = {
|
||||
"enabled": True,
|
||||
"effort": clamp_effort(effort, OPENAI_COMPAT_WIRE_EFFORTS),
|
||||
}
|
||||
# Portal tags + sticky session_id fallback when the profile didn't supply them; session_id
|
||||
# keeps aux calls on the main turn's upstream instance (cache warmth) — tags alone are not
|
||||
# enough on /v1/messages.
|
||||
|
||||
Reference in New Issue
Block a user