LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-corelanguage_modelschat_modelsBaseChatModeloutput_version
    Attribute●Since v1.0

    output_version

    Version of AIMessage output format to store in message content.

    AIMessage.content_blocks will lazily parse the contents of content into a standard format. This flag can be used to additionally store the standard format in message content, e.g., for serialization purposes.

    Supported values:

    • 'v0': provider-specific format in content (can lazily-parse with content_blocks)
    • 'v1': standardized format in content (consistent with content_blocks)

    Partner packages (e.g., langchain-openai) can also use this field to roll out new content formats in a backward-compatible way.

    Copy
    output_version: str | None = Field(default_factory=(from_env('LC_OUTPUT_VERSION', default=None)))
    View source on GitHub