{"record":{"id":"26568bd26ecf0285","repo":"langchain-ai/langgraph","slug":"must-have-langchain-core-0-3-11-installed-to-use","errorCode":null,"errorMessage":"Must have langchain-core>=0.3.11 installed to use automatic message formatting (format='langchain-openai'). Please update your langchain-core version or remove the 'format' flag. Returning un-formatted messages.","messagePattern":"Must have langchain-core>=0\\.3\\.11 installed to use automatic message formatting \\(format='langchain-openai'\\)\\. Please update your langchain-core version or remove the 'format' flag\\. Returning un-formatted messages\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/graph/message.py","lineNumber":386,"sourceCode":"        )\n        super().__init__(Annotated[list[AnyMessage], add_messages])  # type: ignore[arg-type]\n\n\nclass MessagesState(TypedDict):\n    messages: Annotated[list[AnyMessage], add_messages]\n\n\ndef _format_messages(messages: Sequence[BaseMessage]) -> list[BaseMessage]:\n    try:\n        from langchain_core.messages import convert_to_openai_messages\n    except ImportError:\n        msg = (\n            \"Must have langchain-core>=0.3.11 installed to use automatic message \"\n            \"formatting (format='langchain-openai'). Please update your langchain-core \"\n            \"version or remove the 'format' flag. Returning un-formatted \"\n            \"messages.\"\n        )\n        warnings.warn(msg)\n        return list(messages)\n    else:\n        return convert_to_messages(convert_to_openai_messages(messages))\n\n\ndef push_message(\n    message: MessageLikeRepresentation | BaseMessageChunk,\n    *,\n    state_key: str | None = \"messages\",\n) -> AnyMessage:\n    \"\"\"Write a message manually to the `messages` / `messages-tuple` stream mode.\n\n    Will automatically write to the channel specified in the `state_key` unless `state_key` is `None`.\n    \"\"\"\n\n    from langchain_core.callbacks.base import (\n        BaseCallbackHandler,\n        BaseCallbackManager,","sourceCodeStart":368,"sourceCodeEnd":404,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/graph/message.py#L368-L404","documentation":"Error \"Must have langchain-core>=0.3.11 installed to use automatic message formatting (format='langchain-openai'). Please update your langchain-core version or remove the 'format' flag. Returning un-formatted messages.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/graph/message.py:386 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}