[GH-ISSUE #1269] [langsmith]: JS/TS z.custom<BaseMessage[]>().register(registry, MessagesZodMeta) does not render interactive Messages in LangSmith Studio #186

Open
opened 2026-02-17 17:19:21 -05:00 by yindo · 0 comments
Owner

Originally created by @d0lwl0b on GitHub (Nov 4, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/1269

Type of issue

issue / bug

Language

JavaScript

Description

Describe the bug

When using the recommended MessagesZodMeta integration for state schemas, the messages field does not render as interactive chat messages in LangSmith Studio. Instead, the field only shows a raw array [], and the “View Rendered” panel does not activate the interactive message UI.


Environment

{
  "langchain": "^1.0.2",
  "@langchain/core": "^1.0.2",
  "@langchain/community": "^1.0.0",
  "@langchain/deepseek": "^1.0.0",
  "@langchain/openai": "^1.0.0",

  "@langchain/langgraph": "^1.0.1",
  "@langchain/langgraph-checkpoint-postgres": "^1.0.0",
  "@langchain/langgraph-cli": "^1.0.3",
  "@langchain/langgraph-sdk": "^1.0.0"
}

Code Snippet

// state.ts
import { z } from "zod";
import type { BaseMessage } from "@langchain/core/messages";
import { MessagesZodMeta } from "@langchain/langgraph";
import { registry } from "@langchain/langgraph/zod";

export const State = z.object({
  messages: z.custom<BaseMessage[]>().register(registry, MessagesZodMeta),
  // ...
});

Actual Behavior

  • In LangSmith Studio:

    • The messages field only displays as [] raw JSON.
    • The interactive chat viewer is not activated.

Expected Behavior

  • The messages field should render using the built-in interactive message UI (similar to how LangChain message traces render in Studio).

Additional Context

This appears to be a discrepancy specifically in LangSmith Studio UI rendering, because runtime behavior inside the graph is correct.

Originally created by @d0lwl0b on GitHub (Nov 4, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/1269 ### Type of issue issue / bug ### Language JavaScript ### Description **Describe the bug** When using the recommended `MessagesZodMeta` integration for state schemas, the `messages` field does not render as interactive chat messages in **LangSmith Studio**. Instead, the field only shows a raw array `[]`, and the “View Rendered” panel does not activate the interactive message UI. --- **Environment** ```json { "langchain": "^1.0.2", "@langchain/core": "^1.0.2", "@langchain/community": "^1.0.0", "@langchain/deepseek": "^1.0.0", "@langchain/openai": "^1.0.0", "@langchain/langgraph": "^1.0.1", "@langchain/langgraph-checkpoint-postgres": "^1.0.0", "@langchain/langgraph-cli": "^1.0.3", "@langchain/langgraph-sdk": "^1.0.0" } ``` --- **Code Snippet** ```ts // state.ts import { z } from "zod"; import type { BaseMessage } from "@langchain/core/messages"; import { MessagesZodMeta } from "@langchain/langgraph"; import { registry } from "@langchain/langgraph/zod"; export const State = z.object({ messages: z.custom<BaseMessage[]>().register(registry, MessagesZodMeta), // ... }); ``` --- **Actual Behavior** * In LangSmith Studio: * The `messages` field only displays as `[]` raw JSON. * The **interactive chat viewer** is not activated. **Expected Behavior** * The `messages` field should render using the built-in **interactive message UI** (similar to how LangChain message traces render in Studio). --- **Additional Context** This appears to be a discrepancy specifically in **LangSmith Studio UI rendering**, because runtime behavior inside the graph is correct.
yindo added the langsmithexternal labels 2026-02-17 17:19:21 -05:00
yindo changed title from [langsmith]: JS/TS `z.custom<BaseMessage[]>().register(registry, MessagesZodMeta)` does not render interactive Messages in LangSmith Studio to [GH-ISSUE #1269] [langsmith]: JS/TS `z.custom<BaseMessage[]>().register(registry, MessagesZodMeta)` does not render interactive Messages in LangSmith Studio 2026-06-05 17:25:31 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#186