Skip to content

Track LangChain content type bridge cleanup #130

@danny-avila

Description

@danny-avila

The LangChain/LangGraph 1.x upgrade introduces src/messages/langchain.ts as a compatibility bridge between LibreChat's extended content blocks and LangChain's stricter MessageContent type.\n\nFollow-up goals:\n\n- Align LibreChat content block types with LangChain 1.x ContentBlock/MessageContent where possible.\n- Replace cast-only toLangChainContent and toLangChainMessageFields helpers with typed conversions or remove them.\n- Add focused coverage for any runtime conversion behavior if conversion becomes non-trivial.\n- Keep provider-specific extensions explicit so future LangChain runtime validation cannot reject content unexpectedly.\n\nThis is intentionally follow-up work; the current bridge is scoped to unblock the dependency upgrade without changing runtime message shapes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions