Skip to content

langchain-model-profiles

PyPI - Version PyPI - License PyPI - Downloads

Reference documentation for the langchain-model-profiles package.

Beta package

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

langchain_model_profiles

Model profiles entrypoint.

FUNCTION DESCRIPTION
get_model_profile

Get the model capabilities for a given model.

ModelProfile

Bases: TypedDict

Model profile.

max_input_tokens instance-attribute

max_input_tokens: int

Maximum context window (tokens)

image_inputs instance-attribute

image_inputs: bool

Whether image inputs are supported.

image_url_inputs instance-attribute

image_url_inputs: bool

Whether image URL inputs are supported.

pdf_inputs instance-attribute

pdf_inputs: bool

Whether PDF inputs are supported.

audio_inputs instance-attribute

audio_inputs: bool

Whether audio inputs are supported.

video_inputs instance-attribute

video_inputs: bool

Whether video inputs are supported.

image_tool_message instance-attribute

image_tool_message: bool

TODO: description.

pdf_tool_message instance-attribute

pdf_tool_message: bool

TODO: description.

max_output_tokens instance-attribute

max_output_tokens: int

Maximum output tokens

reasoning_output instance-attribute

reasoning_output: bool

Whether the model supports reasoning / chain-of-thought

image_outputs instance-attribute

image_outputs: bool

Whether image outputs are supported.

audio_outputs instance-attribute

audio_outputs: bool

Whether audio outputs are supported.

video_outputs instance-attribute

video_outputs: bool

Whether video outputs are supported.

tool_calling instance-attribute

tool_calling: bool

Whether the model supports tool calling

tool_choice instance-attribute

tool_choice: bool

Whether the model supports tool choice

structured_output instance-attribute

structured_output: bool

Whether the model supports a native structured output feature

get_model_profile

get_model_profile(provider: str, model: str) -> ModelProfile | None

Get the model capabilities for a given model.

PARAMETER DESCRIPTION
provider

Identifier for provider (e.g., 'openai', 'anthropic').

TYPE: str

model

Identifier for model (e.g., 'gpt-5', 'claude-sonnet-4-5-20250929').

TYPE: str

RETURNS DESCRIPTION
ModelProfile | None

The model capabilities or None if not found in the data.