Files
langchain/libs/model-profiles

🦜🪪 langchain-model-profiles

PyPI - Version PyPI - License PyPI - Downloads Twitter

Warning

This package is currently in development and the API is subject to change.

Centralized reference of LLM capabilities for LangChain chat models.

Quick Install

pip install "langchain[model-profiles]"

🤔 What is this?

langchain-model-profiles enables programmatic access to model capabilities through a .profile property on LangChain chat models.

This allows you to query model-specific features such as context window sizes, supported input/output modalities, structured output support, tool calling capabilities, and more.

📖 Documentation

For full documentation, see the API reference. For conceptual guides, tutorials, and examples on using LangChain, see the LangChain Docs.


Data sources

This package is built on top of the excellent work by the models.dev project, an open source initiative that provides model capability data.

This package augments the data from models.dev with some additional fields. We intend to keep this aligned with the upstream project as it evolves.

Usage

Access model capabilities through the .profile property on any LangChain chat model:

# pip install "langchain[openai]"

from langchain.chat_models import init_chat_model

model = init_chat_model("openai:gpt-5")
profile = model.profile

# Check specific capabilities
if profile.get("structured_output"):
    print(f"This model supports a dedicated structured output feature.")

if profile.get("max_input_tokens"):
    print(f"Max input tokens: {profile.get('max_input_tokens')}")

if profile.get("..."):
    ...

Available fields

See ModelProfile in model_profile.py for the full list of available fields and their descriptions.