From 70b5d0a5e406627723b58f6d608dd46eed54feba Mon Sep 17 00:00:00 2001 From: Yetibot Date: Sun, 7 Jun 2026 19:25:29 +0000 Subject: [PATCH 1/2] fix(agent): remove reasoning and thinking from responses --- src/yetibot/core/commands/agent.clj | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/yetibot/core/commands/agent.clj b/src/yetibot/core/commands/agent.clj index 51735b44..2e584221 100644 --- a/src/yetibot/core/commands/agent.clj +++ b/src/yetibot/core/commands/agent.clj @@ -397,11 +397,12 @@ "When you mention or address a person, write their Discord mention token " "<@id> verbatim (e.g. <@49312021375614976>) — it pings them and Discord " "shows their server name; never invent names or use raw numeric ids.\n\n" - "Now do the work, then reply with ONLY your final answer — concise and in the " - "brief, playful, and cheerful persona of Bonzi Buddy, the classic purple gorilla " - "Windows assistant (keep the facts exact), no step-by-step " - "narration, and reference any pull requests as full URLs " - "(https://github.com/owner/repo/pull/123), never the #123 shorthand.")) + "Now do the work, then reply with ONLY your final answer — concise, direct, " + "and in the brief, playful, and cheerful persona of Bonzi Buddy, the classic purple " + "gorilla Windows assistant (keep the facts exact). Do NOT include any step-by-step " + "narration, internal thinking, reasoning, or lists of justifications/explanations. " + "Just provide the final conclusion or result. Reference any pull requests as full " + "URLs (https://github.com/owner/repo/pull/123), never the #123 shorthand.")) ;; Authenticate git pushes to github.com with GH_TOKEN, so the agent's plain ;; `git push` over HTTPS works without prompting (the token alone only auths the @@ -422,13 +423,14 @@ narration on stdout; stderr is discarded). Returns {:response :exit n :timed-out bool}." [workdir request context mentions token] - ;; cap the agent's turn budget via a workspace settings file, and configure the custom tools + ;; cap the agent's turn budget via a workspace settings file, configure custom tools, and disable model reasoning to keep responses concise (let [settings-dir (io/file workdir ".gemini")] (.mkdirs settings-dir) (spit (io/file settings-dir "settings.json") (json/write-str {:maxSessionTurns (agent-max-turns) :tools {:discoveryCommand "./yetibot-tool.py --list" - :callCommand "./yetibot-tool.py"}}))) + :callCommand "./yetibot-tool.py"} + :modelConfig {:generateContentConfig {:thinkingConfig {:thinkingBudget 0}}}}))) ;; write the yetibot custom tool script (let [yetibot-tool-script (io/file workdir "yetibot-tool.py")] (spit yetibot-tool-script From beda1ba6926014792141f11f00aab18818fa7499 Mon Sep 17 00:00:00 2001 From: Yetibot Date: Mon, 8 Jun 2026 13:57:16 +0000 Subject: [PATCH 2/2] fix(agent): hide reasoning instead of disabling it to keep agent intelligent --- src/yetibot/core/commands/agent.clj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/yetibot/core/commands/agent.clj b/src/yetibot/core/commands/agent.clj index 2e584221..f018d120 100644 --- a/src/yetibot/core/commands/agent.clj +++ b/src/yetibot/core/commands/agent.clj @@ -400,7 +400,7 @@ "Now do the work, then reply with ONLY your final answer — concise, direct, " "and in the brief, playful, and cheerful persona of Bonzi Buddy, the classic purple " "gorilla Windows assistant (keep the facts exact). Do NOT include any step-by-step " - "narration, internal thinking, reasoning, or lists of justifications/explanations. " + "narration or lists of justifications/explanations in your final reply. " "Just provide the final conclusion or result. Reference any pull requests as full " "URLs (https://github.com/owner/repo/pull/123), never the #123 shorthand.")) @@ -423,14 +423,16 @@ narration on stdout; stderr is discarded). Returns {:response :exit n :timed-out bool}." [workdir request context mentions token] - ;; cap the agent's turn budget via a workspace settings file, configure custom tools, and disable model reasoning to keep responses concise + ;; cap the agent's turn budget via a workspace settings file, configure custom tools, and hide model reasoning to keep responses concise (let [settings-dir (io/file workdir ".gemini")] (.mkdirs settings-dir) (spit (io/file settings-dir "settings.json") (json/write-str {:maxSessionTurns (agent-max-turns) :tools {:discoveryCommand "./yetibot-tool.py --list" :callCommand "./yetibot-tool.py"} - :modelConfig {:generateContentConfig {:thinkingConfig {:thinkingBudget 0}}}}))) + :ui {:inlineThinkingMode "off"} + :modelConfig {:generateContentConfig {:thinkingConfig {:includeThoughts false + :thinkingBudget 16000}}}}))) ;; write the yetibot custom tool script (let [yetibot-tool-script (io/file workdir "yetibot-tool.py")] (spit yetibot-tool-script