From f149e1e567b0a06d307ca90ab4761833bd5c5f8e Mon Sep 17 00:00:00 2001 From: argabor <23378723+argabor@users.noreply.github.com> Date: Mon, 18 May 2026 20:15:14 -0700 Subject: [PATCH] fix(cli): make kanban specify max_tokens configurable --- hermes_cli/kanban_specify.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hermes_cli/kanban_specify.py b/hermes_cli/kanban_specify.py index 0d57fbb2504..1ad576bf8f1 100644 --- a/hermes_cli/kanban_specify.py +++ b/hermes_cli/kanban_specify.py @@ -40,6 +40,11 @@ from typing import Optional from hermes_cli import kanban_db as kb +HERMES_KANBAN_SPECIFY_MAX_TOKENS = max( + 1500, + int(os.getenv("HERMES_KANBAN_SPECIFY_MAX_TOKENS", "6000")), +) + logger = logging.getLogger(__name__) @@ -185,7 +190,7 @@ def specify_task( {"role": "user", "content": user_msg}, ], temperature=0.3, - max_tokens=1500, + max_tokens=HERMES_KANBAN_SPECIFY_MAX_TOKENS, timeout=timeout or 120, extra_body=get_auxiliary_extra_body() or None, ) @@ -199,7 +204,7 @@ def specify_task( ) try: - raw = resp.choices[0].message.content or "" + raw = (resp.choices[0].message.content or "").strip() except Exception: raw = ""