The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(agent): drop defensive capability try/except and dead reasoning_only copy
kshitijk4poor806b1e99c979
diff --git a/agent/agent_runtime_helpers.py b/agent/agent_runtime_helpers.pyindex 55bca8a4309..f356a5da022 100644--- a/agent/agent_runtime_helpers.py+++ b/agent/agent_runtime_helpers.py@@ -1603,21 +1603,18 @@ def answer_in_reasoning_capability(agent: Any) -> bool:if isinstance(configured, bool):return configured- # Custom model maps already support exact per-route boolean capabilities. Keep the- # lookup best-effort: a malformed optional config must not break response handling.- try:- from hermes_cli.config import get_custom_provider_model_capability-- configured = get_custom_provider_model_capability(- model=str(getattr(agent, "model", "") or ""),- base_url=base_url,- capability=_ANSWER_IN_REASONING_CAPABILITY,- custom_providers=getattr(agent, "_custom_providers", None),- )- if configured is not None:- return configured- except Exception:- logger.debug("answer-in-reasoning capability lookup failed", exc_info=True)+ # Custom model maps already support exact per-route boolean capabilities (the lookup+ # returns None on unreadable config).+ from hermes_cli.config import get_custom_provider_model_capability++ configured = get_custom_provider_model_capability(+ model=str(getattr(agent, "model", "") or ""),+ base_url=base_url,+ capability=_ANSWER_IN_REASONING_CAPABILITY,+ custom_providers=getattr(agent, "_custom_providers", None),+ )+ if configured is not None:+ return configuredmodel = str(getattr(agent, "model", "") or "").strip().lower()if _NEMOTRON_PARSER_MODEL_MARKER not in model:diff --git a/agent/turn_failure_copy.py b/agent/turn_failure_copy.pyindex 115231f66a8..e5fee24e7d5 100644--- a/agent/turn_failure_copy.py+++ b/agent/turn_failure_copy.py@@ -337,11 +337,6 @@ _ONE_OFF_COPY: Dict[str, str] = {"Hermes hit an internal error while handling the model's reply and stopped this turn. "+ _NEXT_STEPS_LOOP + "\n\nDetails: {detail}"),- "reasoning_only": (- "⚠️ {model} spent all of its output budget thinking and never wrote an answer. Lower "- "its reasoning effort with `/reasoning low`, or switch to a different model with /model. "- "Its last thoughts, which may contain the answer:\n\n{preview}"- ),"max_iterations_no_summary": ("I ran out of steps for this turn ({limit} tool calls) before finishing, and couldn't ""produce a summary. Send `continue` to keep going, or raise `max_iterations` in your config."