发布

  • [OPIK-4493] [FE] Add LangChain/LangGraph message format support (#5301)

    frostbyte_neo 发布于 2026-02-24 11:04:52 +00:00

    • [OPIK-4493] [FE] Add LangChain/LangGraph message format support

    Rename LLMProvider → LLMMessageFormat across the detection system and add
    a new "langchain" format so the Messages tab renders for LangGraph traces.

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • [OPIK-4493] [FE] Encapsulate combiner logic in llmMessages module

    Move detect → map → combine pipeline into mapAndCombineMessages() so
    MessagesTab no longer reaches into provider internals. Add FormatCombiner
    type and LangChain-specific combiner that deduplicates LangGraph state
    messages.

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • [OPIK-4493] [FE] Handle nested input wrapper in LangChain detector/mapper

    When LangGraph input is a Pydantic BaseModel, the SDK serializes trace
    input as { input: { messages: [...] } }. Add unwrapping logic in the
    detector and mapper to check data.input.messages when data.messages
    is not found (input-only).

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • [OPIK-4493] [FE] Fix combiner dropping input when output is not a superset

    The LangChain combiner incorrectly treated any flat output.messages as a
    LangGraph state superset, dropping input messages. Add a length check so
    input is only omitted when output has at least as many messages.

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • [OPIK-4493] [FE] Use content fingerprints for combiner dedup instead of raw parsing

    Replace raw-message re-parsing in the combiner with a contentFingerprint
    computed once during mapping. This fixes false superset detection (equal-length
    conversations with different content) and avoids double-parsing of nested input
    wrappers.

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com


    Co-authored-by: Claude Opus 4.6 noreply@anthropic.com

    下载附件