Skip to main content

Centralized reference of LLM capabilities.

Project description

🦜🪪 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.

Overview

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.

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.

Installation

pip install "langchain[model-profiles]"

Or with uv:

uv add "langchain[model-profiles]"

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.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_model_profiles-0.0.4.tar.gz (145.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_model_profiles-0.0.4-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file langchain_model_profiles-0.0.4.tar.gz.

File metadata

  • Download URL: langchain_model_profiles-0.0.4.tar.gz
  • Upload date:
  • Size: 145.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for langchain_model_profiles-0.0.4.tar.gz
Algorithm Hash digest
SHA256 b66909339c9175a6963e7fcdacae382b4773f8da04092b9dd64424b8e8b1f8c8
MD5 a11c0082204ceae5e9adfcc744b6975e
BLAKE2b-256 69c3cbadf3e884bfbd57f4604a68d67132ece45c3510a1ec710a5193b4b1a1af

See more details on using hashes here.

File details

Details for the file langchain_model_profiles-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_model_profiles-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7382b7feb2294ded84fe89b20a4d656f81f40c8f024233205b2c5507391ce1ba
MD5 dcc9f7c9afbbf568e77c52e7bdb5a81f
BLAKE2b-256 50f0a848f99a9d70f40c2f46c8d9465549adc6e8b678658be3ca11ce16287e24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page