fix(agent): restore reasoning tag enforcement for non-ollama providers

This restores the fix from PR #754 which was accidentally reverted in bf11a42c3.
This commit is contained in:
Jake
2026-01-13 09:47:04 +13:00
parent 6f496b7739
commit eceb41f6f7

View File

@@ -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 } : {}),
},
};