diff --git a/langfuse-core/src/prompts/promptClients.ts b/langfuse-core/src/prompts/promptClients.ts index d9d3c17a1..26f1352d8 100644 --- a/langfuse-core/src/prompts/promptClients.ts +++ b/langfuse-core/src/prompts/promptClients.ts @@ -235,7 +235,7 @@ export class ChatPromptClient extends BasePromptClient { } return messagesWithPlaceholdersReplaced.map((item) => { - if (typeof item === "object" && item !== null && "role" in item && "content" in item) { + if (typeof item === "object" && item !== null && "role" in item && "content" in item && typeof item.content === "string") { return { ...item, content: mustache.render(item.content, variables ?? {}),