From eceb41f6f79f144ddbef60a8641f1c2af117bf65 Mon Sep 17 00:00:00 2001 From: Jake Date: Tue, 13 Jan 2026 09:47:04 +1300 Subject: [PATCH] fix(agent): restore reasoning tag enforcement for non-ollama providers This restores the fix from PR #754 which was accidentally reverted in bf11a42c3. --- src/auto-reply/reply.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/auto-reply/reply.ts b/src/auto-reply/reply.ts index a8fc461fa..8c4521a08 100644 --- a/src/auto-reply/reply.ts +++ b/src/auto-reply/reply.ts @@ -40,6 +40,7 @@ import { import { normalizeMainKey } from "../routing/session-key.js"; import { defaultRuntime } from "../runtime.js"; import { INTERNAL_MESSAGE_PROVIDER } from "../utils/message-provider.js"; +import { isReasoningTagProvider } from "../utils/provider-utils.js"; import { resolveCommandAuthorization } from "./command-auth.js"; import { hasControlCommand } from "./command-detection.js"; import { @@ -1198,7 +1199,7 @@ export async function getReplyFromConfig( ownerNumbers: command.ownerList.length > 0 ? command.ownerList : undefined, extraSystemPrompt: extraSystemPrompt || undefined, - ...(provider === "ollama" ? { enforceFinalTag: true } : {}), + ...(isReasoningTagProvider(provider) ? { enforceFinalTag: true } : {}), }, };