Implementation:Langchain ai Langchain Anthropic Model Profiles: Difference between revisions
Auto-imported from implementations/Langchain_ai_Langchain_Anthropic_Model_Profiles.md |
Sync from local file |
||
| Line 160: | Line 160: | ||
== Related Pages == | == Related Pages == | ||
* [[Langchain_ai_Langchain_AnthropicLLM|AnthropicLLM implementation]] | * [[Implementation:Langchain_ai_Langchain_AnthropicLLM|AnthropicLLM implementation]] | ||
* [[implemented_by::langchain_anthropic.chat_models.ChatAnthropic]] | * [[implemented_by::langchain_anthropic.chat_models.ChatAnthropic]] | ||
* [[uses_heuristic::Auto-generated from models.dev project data]] | * [[uses_heuristic::Auto-generated from models.dev project data]] | ||
[[Category:Implementations]] | [[Category:Implementations]] | ||
Latest revision as of 10:44, 27 September 2026
| Knowledge Sources | |
|---|---|
| Domains | LLM Framework, Anthropic, Model Configuration |
| Last Updated | 2026-02-11 00:00 GMT |
Overview
The _profiles.py module provides an auto-generated dictionary of Anthropic Claude model profiles, defining capability metadata such as token limits, supported input/output modalities, and feature flags for each model variant.
Description
This file is an auto-generated data module within the langchain-anthropic partner package. It contains a single dictionary _PROFILES that maps Claude model identifiers (e.g., "claude-opus-4-6", "claude-sonnet-4-5") to their capability profiles. These profiles are derived from the models.dev project and are generated by the langchain-profiles CLI tool. The data is consumed by ChatAnthropic to automatically configure model-specific settings.
Usage
This module is consumed internally by the langchain_anthropic package. It should not be imported directly by end users. The profiles are used to populate ModelProfile instances on ChatAnthropic.
Code Reference
Source Location
- Repository: Langchain_ai_Langchain
- File:
libs/partners/anthropic/langchain_anthropic/data/_profiles.py - Lines: 1-437
Signature
_PROFILES: dict[str, dict[str, Any]] = {
"claude-opus-4-0": { ... },
"claude-sonnet-4-5": { ... },
"claude-haiku-4-5": { ... },
# ... 22 model entries total
}
Import
# Internal usage only
from langchain_anthropic.data._profiles import _PROFILES
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | N/A | N/A | This is a data-only module with no function inputs |
Outputs
| Name | Type | Description |
|---|---|---|
| _PROFILES | dict[str, dict[str, Any]] |
Dictionary mapping model name strings to their capability profile dictionaries |
Profile Schema
Each model profile entry contains the following fields:
| Field | Type | Description |
|---|---|---|
| max_input_tokens | int | Maximum number of input tokens (all models: 200,000) |
| max_output_tokens | int | Maximum number of output tokens (ranges from 4,096 to 128,000) |
| text_inputs | bool | Whether the model accepts text inputs |
| image_inputs | bool | Whether the model accepts image inputs |
| audio_inputs | bool | Whether the model accepts audio inputs |
| pdf_inputs | bool | Whether the model accepts PDF inputs |
| video_inputs | bool | Whether the model accepts video inputs |
| text_outputs | bool | Whether the model produces text outputs |
| image_outputs | bool | Whether the model produces image outputs |
| audio_outputs | bool | Whether the model produces audio outputs |
| video_outputs | bool | Whether the model produces video outputs |
| reasoning_output | bool | Whether the model supports extended thinking / reasoning |
| tool_calling | bool | Whether the model supports tool/function calling |
| image_url_inputs | bool | Whether the model accepts image URLs as inputs |
| pdf_tool_message | bool | Whether the model supports PDFs in tool messages |
| image_tool_message | bool | Whether the model supports images in tool messages |
| structured_output | bool | Whether the model supports structured output natively |
Covered Models
The module includes profiles for 22 Claude model variants:
| Model Family | Variants | Max Output Tokens | Reasoning |
|---|---|---|---|
| Claude Opus 4.6 | claude-opus-4-6 |
128,000 | Yes |
| Claude Opus 4.5 | claude-opus-4-5, claude-opus-4-5-20251101 |
64,000 | Yes |
| Claude Opus 4.1 | claude-opus-4-1, claude-opus-4-1-20250805 |
32,000 | Yes |
| Claude Opus 4.0 | claude-opus-4-0, claude-opus-4-20250514 |
32,000 | Yes |
| Claude Sonnet 4.5 | claude-sonnet-4-5, claude-sonnet-4-5-20250929 |
64,000 | Yes |
| Claude Sonnet 4.0 | claude-sonnet-4-0, claude-sonnet-4-20250514 |
64,000 | Yes |
| Claude Haiku 4.5 | claude-haiku-4-5, claude-haiku-4-5-20251001 |
64,000 | Yes |
| Claude 3.7 Sonnet | claude-3-7-sonnet-20250219, claude-3-7-sonnet-latest |
64,000 | Yes |
| Claude 3.5 Sonnet | claude-3-5-sonnet-20241022, claude-3-5-sonnet-20240620 |
8,192 | No |
| Claude 3.5 Haiku | claude-3-5-haiku-latest, claude-3-5-haiku-20241022 |
8,192 | No |
| Claude 3 Opus | claude-3-opus-20240229 |
4,096 | No |
| Claude 3 Haiku | claude-3-haiku-20240307 |
4,096 | No |
| Claude 3 Sonnet | claude-3-sonnet-20240229 |
4,096 | No |
Usage Examples
Basic Usage
# Internal usage within langchain_anthropic
from langchain_anthropic.data._profiles import _PROFILES
# Look up a model's profile
profile = _PROFILES.get("claude-sonnet-4-5")
print(profile["max_output_tokens"]) # 64000
print(profile["reasoning_output"]) # True
print(profile["tool_calling"]) # True