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.
The LangChain/LangGraph 1.x upgrade introduces
src/messages/langchain.tsas a compatibility bridge between LibreChat's extended content blocks and LangChain's stricterMessageContenttype.\n\nFollow-up goals:\n\n- Align LibreChat content block types with LangChain 1.xContentBlock/MessageContentwhere possible.\n- Replace cast-onlytoLangChainContentandtoLangChainMessageFieldshelpers 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.