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-coreexceptionsModelError
    Classā—Since v1.6

    ModelError

    Copy
    ModelError()

    Bases

    LangChainException

    Attributes

    View source on GitHub
    attribute
    is_retryable: bool

    Whether retrying the same model request may succeed.

    Base exception for failures related to model invocation.

    Subclasses correspond to conditions that model providers report consistently, keyed to the HTTP status they surface it with, so the same condition maps to the same exception type regardless of provider.

    Provider integrations raise subclasses that also inherit from the provider SDK's own exception type, so code catching either continues to work.