diff --git a/libs/core/langchain_core/language_models/chat_models.py b/libs/core/langchain_core/language_models/chat_models.py index bfd37ea58835a..6a6cc77088610 100644 --- a/libs/core/langchain_core/language_models/chat_models.py +++ b/libs/core/langchain_core/language_models/chat_models.py @@ -15,7 +15,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing_extensions import override -from langchain_core._api.beta_decorator import beta from langchain_core.caches import BaseCache from langchain_core.callbacks import ( AsyncCallbackManager, @@ -34,6 +33,7 @@ LangSmithParams, LanguageModelInput, ) +from langchain_core.language_models.profile import ModelProfile from langchain_core.load import dumpd, dumps from langchain_core.messages import ( AIMessage, @@ -76,8 +76,6 @@ if TYPE_CHECKING: import uuid - from langchain_model_profiles import ModelProfile # type: ignore[import-untyped] - from langchain_core.output_parsers.base import OutputParserLike from langchain_core.runnables import Runnable, RunnableConfig from langchain_core.tools import BaseTool @@ -339,6 +337,16 @@ class BaseChatModel(BaseLanguageModel[AIMessage], ABC): """ + profile: ModelProfile | None = Field(default=None, exclude=True) + """Profile detailing model capabilities. + + If not specified, automatically loaded from the provider package on initialization + if data is available. + + Example profile data includes context window sizes, supported modalities, or support + for tool calling, structured output, and other features. + """ + model_config = ConfigDict( arbitrary_types_allowed=True, ) @@ -1688,40 +1696,6 @@ class AnswerWithJustification(BaseModel): return RunnableMap(raw=llm) | parser_with_fallback return llm | output_parser - @property - @beta() - def profile(self) -> ModelProfile: - """Return profiling information for the model. - - This property relies on the `langchain-model-profiles` package to retrieve chat - model capabilities, such as context window sizes and supported features. - - Raises: - ImportError: If `langchain-model-profiles` is not installed. - - Returns: - A `ModelProfile` object containing profiling information for the model. - """ - try: - from langchain_model_profiles import get_model_profile # noqa: PLC0415 - except ImportError as err: - informative_error_message = ( - "To access model profiling information, please install the " - "`langchain-model-profiles` package: " - "`pip install langchain-model-profiles`." - ) - raise ImportError(informative_error_message) from err - - provider_id = self._llm_type - model_name = ( - # Model name is not standardized across integrations. New integrations - # should prefer `model`. - getattr(self, "model", None) - or getattr(self, "model_name", None) - or getattr(self, "model_id", "") - ) - return get_model_profile(provider_id, model_name) or {} - class SimpleChatModel(BaseChatModel): """Simplified implementation for a chat model to inherit from. diff --git a/libs/core/langchain_core/language_models/profile/__init__.py b/libs/core/langchain_core/language_models/profile/__init__.py new file mode 100644 index 0000000000000..406a5b6720020 --- /dev/null +++ b/libs/core/langchain_core/language_models/profile/__init__.py @@ -0,0 +1,11 @@ +"""Model profile types and data loading utilities.""" + +from langchain_core.language_models.profile.model_profile import ( + ModelProfile, + ModelProfileRegistry, +) + +__all__ = [ + "ModelProfile", + "ModelProfileRegistry", +] diff --git a/libs/core/langchain_core/language_models/profile/_data_loader.py b/libs/core/langchain_core/language_models/profile/_data_loader.py new file mode 100644 index 0000000000000..0e8d21e00e709 --- /dev/null +++ b/libs/core/langchain_core/language_models/profile/_data_loader.py @@ -0,0 +1,128 @@ +"""Data loader for model profiles with augmentation support.""" + +import json +import sys +from functools import cached_property +from pathlib import Path +from typing import Any + +if sys.version_info >= (3, 11): + import tomllib +else: + import tomli as tomllib + + +class _DataLoader: + """Loads and merges model profile data from base and augmentations. + + See the README in `data/augmentations` directory for more details on the + augmentation structure and merge priority. + """ + + def __init__(self, data_dir: Path) -> None: + """Initialize the loader. + + Args: + data_dir: Path to the data directory containing models.json and + augmentations. + """ + self._data_dir = data_dir + + @property + def _base_data_path(self) -> Path: + """Get path to base data file. + + `models.json` is the downloaded data from models.dev. + """ + return self._data_dir / "models.json" + + @property + def _augmentations_file(self) -> Path: + """Get path to profile augmentations file.""" + return self._data_dir / "profile_augmentations.toml" + + @cached_property + def _merged_data(self) -> dict[str, Any]: + """Load and merge all data once at startup. + + Merging order: + + 1. Base data from `models.json` + 2. Provider-level augmentations from `[overrides]` in + `profile_augmentations.toml` + 3. Model-level augmentations from `[overrides."model-name"]` in + `profile_augmentations.toml` + + Returns: + Fully merged provider data with all augmentations applied. + """ + # Load base data; let exceptions propagate to user + with self._base_data_path.open("r") as f: + data = json.load(f) + + # Load augmentations from profile_augmentations.toml + provider_aug, model_augs = self._load_augmentations() + + # Merge augmentations into data + for provider_data in data.values(): + models = provider_data.get("models", {}) + + for model_id, model_data in models.items(): + # Apply provider-level augmentations + if provider_aug: + model_data.update(provider_aug) + + # Apply model-level augmentations (highest priority) + if model_id in model_augs: + model_data.update(model_augs[model_id]) + + return data + + def _load_augmentations( + self, + ) -> tuple[dict[str, Any], dict[str, dict[str, Any]]]: + """Load augmentations from profile_augmentations.toml. + + Returns: + Tuple of (provider_augmentations, model_augmentations) where: + - provider_augmentations: dict of fields to apply to all models + - model_augmentations: dict mapping model IDs to their specific + augmentations + """ + if not self._augmentations_file.exists(): + return {}, {} + + with self._augmentations_file.open("rb") as f: + data = tomllib.load(f) + + overrides = data.get("overrides", {}) + + # Separate provider-level augmentations from model-specific ones + # Model-specific overrides are nested dicts, while provider-level are primitives + provider_aug: dict[str, Any] = {} + model_augs: dict[str, dict[str, Any]] = {} + + for key, value in overrides.items(): + if isinstance(value, dict): + # This is a model-specific override like [overrides."claude-sonnet-4-5"] + model_augs[key] = value + else: + # This is a provider-level field + provider_aug[key] = value + + return provider_aug, model_augs + + def get_profile_data(self, provider_id: str) -> dict[str, Any] | None: + """Get merged profile data for all models. + + Args: + provider_id: The provider identifier. + + Returns: + Merged model data `dict` or `None` if not found. + """ + provider = self._merged_data.get(provider_id) + if provider is None: + return None + + return provider.get("models", {}) diff --git a/libs/core/langchain_core/language_models/profile/_loader_utils.py b/libs/core/langchain_core/language_models/profile/_loader_utils.py new file mode 100644 index 0000000000000..c1723cd55d268 --- /dev/null +++ b/libs/core/langchain_core/language_models/profile/_loader_utils.py @@ -0,0 +1,45 @@ +"""Utilities for loading model profiles from provider packages.""" + +from functools import lru_cache +from pathlib import Path + +from langchain_core.language_models.profile._data_loader import _DataLoader +from langchain_core.language_models.profile.model_profile import ( + ModelProfileRegistry, + map_raw_data_to_profile, +) + + +def load_profiles_from_data_dir( + data_dir: Path, provider_id: str +) -> ModelProfileRegistry | None: + """Load model profiles from a provider's data directory. + + Args: + data_dir: Path to the provider's data directory. + provider_id: The provider identifier (e.g., 'anthropic', 'openai'). + + Returns: + ModelProfile with model capabilities, or None if not found. + """ + loader = _get_loader(data_dir) + data = loader.get_profile_data(provider_id) + if not data: + return None + return { + model_name: map_raw_data_to_profile(raw_profile) + for model_name, raw_profile in data.items() + } + + +@lru_cache(maxsize=32) +def _get_loader(data_dir: Path) -> _DataLoader: + """Get a cached loader for a data directory. + + Args: + data_dir: Path to the data directory. + + Returns: + DataLoader instance. + """ + return _DataLoader(data_dir) diff --git a/libs/model-profiles/langchain_model_profiles/model_profile.py b/libs/core/langchain_core/language_models/profile/model_profile.py similarity index 59% rename from libs/model-profiles/langchain_model_profiles/model_profile.py rename to libs/core/langchain_core/language_models/profile/model_profile.py index e6dd04dacc62a..0d9dca4b61cf0 100644 --- a/libs/model-profiles/langchain_model_profiles/model_profile.py +++ b/libs/core/langchain_core/language_models/profile/model_profile.py @@ -1,14 +1,16 @@ -"""Model profiles package.""" +"""Model profile types and utilities.""" -import re +from typing import Any from typing_extensions import TypedDict -from langchain_model_profiles._data_loader import _DataLoader - class ModelProfile(TypedDict, total=False): - """Model profile.""" + """Model profile. + + Provides information about chat model capabilities, such as context window sizes + and supported features. + """ # --- Input constraints --- @@ -39,10 +41,10 @@ class ModelProfile(TypedDict, total=False): # TODO: add more detail about formats? e.g. bytes or base64 image_tool_message: bool - """TODO: description.""" + """Whether images can be included in tool messages.""" pdf_tool_message: bool - """TODO: description.""" + """Whether PDFs can be included in tool messages.""" # --- Output constraints --- @@ -77,77 +79,24 @@ class ModelProfile(TypedDict, total=False): feature""" -_LOADER = _DataLoader() - -_lc_type_to_provider_id = { - "openai-chat": "openai", - "azure-openai-chat": "azure", - "anthropic-chat": "anthropic", - "chat-google-generative-ai": "google", - "vertexai": "google-vertex", - "anthropic-chat-vertexai": "google-vertex-anthropic", - "amazon_bedrock_chat": "amazon-bedrock", - "amazon_bedrock_converse_chat": "amazon-bedrock", - "chat-ai21": "ai21", - "chat-deepseek": "deepseek", - "fireworks-chat": "fireworks-ai", - "groq-chat": "groq", - "huggingface-chat-wrapper": "huggingface", - "mistralai-chat": "mistral", - "chat-ollama": "ollama", - "perplexitychat": "perplexity", - "together-chat": "togetherai", - "upstage-chat": "upstage", - "xai-chat": "xai", -} - - -def _translate_provider_and_model_id(provider: str, model: str) -> tuple[str, str]: - """Translate LangChain provider and model to models.dev equivalents. +ModelProfileRegistry = dict[str, ModelProfile] +"""Registry mapping model identifiers or names to their ModelProfile.""" - Args: - provider: LangChain provider ID. - model: LangChain model ID. - Returns: - A tuple containing the models.dev provider ID and model ID. - """ - provider_id = _lc_type_to_provider_id.get(provider, provider) +def map_raw_data_to_profile(data: dict[str, Any]) -> ModelProfile: + """Map raw model data to ModelProfile format. - if provider_id in ("google", "google-vertex"): - # convert models/gemini-2.0-flash-001 to gemini-2.0-flash - model_id = re.sub(r"-\d{3}$", "", model.replace("models/", "")) - elif provider_id == "amazon-bedrock": - # strip region prefixes like "us." - model_id = re.sub(r"^[A-Za-z]{2}\.", "", model) - else: - model_id = model - - return provider_id, model_id - - -def get_model_profile(provider: str, model: str) -> ModelProfile | None: - """Get the model capabilities for a given model. + This function is used by provider packages to convert raw data from models.dev + and augmentations into the standardized ModelProfile format. Args: - provider: Identifier for provider (e.g., `'openai'`, `'anthropic'`). - model: Identifier for model (e.g., `'gpt-5'`, - `'claude-sonnet-4-5-20250929'`). + data: Raw model data from models.dev and augmentations. Returns: - The model capabilities or `None` if not found in the data. + ModelProfile with standardized fields. """ - if not provider or not model: - return None - - provider_id, model_id = _translate_provider_and_model_id(provider, model) - data = _LOADER.get_profile_data(provider_id, model_id) - if not data: - # If either (1) provider not found or (2) model not found under matched provider - return None - # Map models.dev & augmentation fields -> ModelProfile fields - # See schema reference to see fields dropped: https://github.com/sst/models.dev?tab=readme-ov-file#schema-reference + # See schema reference: https://github.com/sst/models.dev?tab=readme-ov-file#schema-reference profile = { "max_input_tokens": data.get("limit", {}).get("context"), "image_inputs": "image" in data.get("modalities", {}).get("input", []), diff --git a/libs/core/pyproject.toml b/libs/core/pyproject.toml index 868acca738e55..6e356c9afffa4 100644 --- a/libs/core/pyproject.toml +++ b/libs/core/pyproject.toml @@ -36,7 +36,6 @@ typing = [ "mypy>=1.18.1,<1.19.0", "types-pyyaml>=6.0.12.2,<7.0.0.0", "types-requests>=2.28.11.5,<3.0.0.0", - "langchain-model-profiles", "langchain-text-splitters", ] dev = [ @@ -58,7 +57,6 @@ test = [ "blockbuster>=1.5.18,<1.6.0", "numpy>=1.26.4; python_version<'3.13'", "numpy>=2.1.0; python_version>='3.13'", - "langchain-model-profiles", "langchain-tests", "pytest-benchmark", "pytest-codspeed", @@ -66,7 +64,6 @@ test = [ test_integration = [] [tool.uv.sources] -langchain-model-profiles = { path = "../model-profiles" } langchain-tests = { path = "../standard-tests" } langchain-text-splitters = { path = "../text-splitters" } diff --git a/libs/core/tests/unit_tests/language_models/chat_models/test_base.py b/libs/core/tests/unit_tests/language_models/chat_models/test_base.py index e0a2cb291c9b3..f9de77196815f 100644 --- a/libs/core/tests/unit_tests/language_models/chat_models/test_base.py +++ b/libs/core/tests/unit_tests/language_models/chat_models/test_base.py @@ -1222,19 +1222,12 @@ def _llm_type(self) -> str: def test_model_profiles() -> None: model = GenericFakeChatModel(messages=iter([])) - profile = model.profile - assert profile == {} + assert model.profile is None - class MyModel(GenericFakeChatModel): - model: str = "gpt-5" - - @property - def _llm_type(self) -> str: - return "openai-chat" - - model = MyModel(messages=iter([])) - profile = model.profile - assert profile + model_with_profile = GenericFakeChatModel( + messages=iter([]), profile={"max_input_tokens": 100} + ) + assert model_with_profile.profile == {"max_input_tokens": 100} class MockResponse: diff --git a/libs/core/tests/unit_tests/language_models/profile/__init__.py b/libs/core/tests/unit_tests/language_models/profile/__init__.py new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/libs/core/tests/unit_tests/language_models/profile/test_data_loader.py b/libs/core/tests/unit_tests/language_models/profile/test_data_loader.py new file mode 100644 index 0000000000000..886bf45333273 --- /dev/null +++ b/libs/core/tests/unit_tests/language_models/profile/test_data_loader.py @@ -0,0 +1,137 @@ +"""Tests for data loader with augmentation support.""" + +import json +from pathlib import Path + +import pytest + +from langchain_core.language_models.profile._data_loader import _DataLoader + + +@pytest.fixture +def temp_data_dir(tmp_path: Path) -> Path: + """Create a temporary data directory structure.""" + data_dir = tmp_path / "data" + data_dir.mkdir() + + # Create base models.json + base_data = { + "test-provider": { + "id": "test-provider", + "models": { + "test-model": { + "id": "test-model", + "name": "Test Model", + "tool_call": True, + "limit": {"context": 8000, "output": 4000}, + "modalities": {"input": ["text"], "output": ["text"]}, + }, + "test-model-2": { + "id": "test-model-2", + "name": "Test Model 2", + "tool_call": True, + "limit": {"context": 16000, "output": 8000}, + "modalities": {"input": ["text"], "output": ["text"]}, + }, + }, + } + } + + with (data_dir / "models.json").open("w") as f: + json.dump(base_data, f) + + return data_dir + + +def test_load_base_data_only(temp_data_dir: Path) -> None: + """Test loading base data without augmentations.""" + loader = _DataLoader(temp_data_dir) + result = loader.get_profile_data("test-provider") + + assert result is not None + assert len(result) == 2 + model = result["test-model"] + assert model["id"] == "test-model" + assert model["name"] == "Test Model" + assert model["tool_call"] is True + + +def test_provider_level_augmentation(temp_data_dir: Path) -> None: + """Test provider-level augmentations are applied.""" + # Add provider augmentation using new format + aug_file = temp_data_dir / "profile_augmentations.toml" + aug_file.write_text(""" +provider = "test-provider" + +[overrides] +image_url_inputs = true +pdf_inputs = true +""") + + loader = _DataLoader(temp_data_dir) + result = loader.get_profile_data("test-provider") + + assert result is not None + model = result["test-model"] + assert model["image_url_inputs"] is True + assert model["pdf_inputs"] is True + # Base data should still be present + assert model["tool_call"] is True + + +def test_model_level_augmentation_overrides_provider(temp_data_dir: Path) -> None: + """Test model-level augmentations override provider augmentations.""" + # Add both provider and model augmentations using new format + aug_file = temp_data_dir / "profile_augmentations.toml" + aug_file.write_text(""" +provider = "test-provider" + +[overrides] +image_url_inputs = true +pdf_inputs = false + +[overrides."test-model"] +pdf_inputs = true +reasoning_output = true +""") + + loader = _DataLoader(temp_data_dir) + result = loader.get_profile_data("test-provider") + + assert result is not None + model = result["test-model"] + # From provider + assert model["image_url_inputs"] is True + # Overridden by model + assert model["pdf_inputs"] is True + # From model only + assert model["reasoning_output"] is True + # From base + assert model["tool_call"] is True + + # Check that model-2 only has provider-level augmentations + model2 = result["test-model-2"] + assert model2["image_url_inputs"] is True + assert model2["pdf_inputs"] is False + assert "reasoning_output" not in model2 + + +def test_missing_provider(temp_data_dir: Path) -> None: + """Test returns None for missing provider.""" + loader = _DataLoader(temp_data_dir) + result = loader.get_profile_data("nonexistent-provider") + + assert result is None + + +def test_merged_data_is_cached(temp_data_dir: Path) -> None: + """Test that merged data is cached after first access.""" + loader = _DataLoader(temp_data_dir) + # First access + result1 = loader.get_profile_data("test-provider") + # Second access should use cached data + result2 = loader.get_profile_data("test-provider") + + assert result1 == result2 + # Verify it's using the cached property by checking _merged_data was accessed + assert hasattr(loader, "_merged_data") diff --git a/libs/core/uv.lock b/libs/core/uv.lock index fa6cd3b7aaf47..bd74f0cdf8dec 100644 --- a/libs/core/uv.lock +++ b/libs/core/uv.lock @@ -985,7 +985,6 @@ test = [ { name = "blockbuster" }, { name = "freezegun" }, { name = "grandalf" }, - { name = "langchain-model-profiles" }, { name = "langchain-tests" }, { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "numpy", version = "2.3.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, @@ -1001,7 +1000,6 @@ test = [ { name = "syrupy" }, ] typing = [ - { name = "langchain-model-profiles" }, { name = "langchain-text-splitters" }, { name = "mypy" }, { name = "types-pyyaml" }, @@ -1031,7 +1029,6 @@ test = [ { name = "blockbuster", specifier = ">=1.5.18,<1.6.0" }, { name = "freezegun", specifier = ">=1.2.2,<2.0.0" }, { name = "grandalf", specifier = ">=0.8.0,<1.0.0" }, - { name = "langchain-model-profiles", directory = "../model-profiles" }, { name = "langchain-tests", directory = "../standard-tests" }, { name = "numpy", marker = "python_full_version < '3.13'", specifier = ">=1.26.4" }, { name = "numpy", marker = "python_full_version >= '3.13'", specifier = ">=2.1.0" }, @@ -1048,53 +1045,12 @@ test = [ ] test-integration = [] typing = [ - { name = "langchain-model-profiles", directory = "../model-profiles" }, { name = "langchain-text-splitters", directory = "../text-splitters" }, { name = "mypy", specifier = ">=1.18.1,<1.19.0" }, { name = "types-pyyaml", specifier = ">=6.0.12.2,<7.0.0.0" }, { name = "types-requests", specifier = ">=2.28.11.5,<3.0.0.0" }, ] -[[package]] -name = "langchain-model-profiles" -version = "0.0.4" -source = { directory = "../model-profiles" } -dependencies = [ - { name = "tomli", marker = "python_full_version < '3.11'" }, - { name = "typing-extensions" }, -] - -[package.metadata] -requires-dist = [ - { name = "tomli", marker = "python_full_version < '3.11'", specifier = ">=2.0.0,<3.0.0" }, - { name = "typing-extensions", specifier = ">=4.7.0,<5.0.0" }, -] - -[package.metadata.requires-dev] -dev = [{ name = "httpx", specifier = ">=0.23.0,<1" }] -lint = [ - { name = "langchain", editable = "../langchain_v1" }, - { name = "ruff", specifier = ">=0.12.2,<0.13.0" }, -] -test = [ - { name = "langchain", extras = ["openai"], editable = "../langchain_v1" }, - { name = "langchain-core", editable = "." }, - { name = "pytest", specifier = ">=8.0.0,<9.0.0" }, - { name = "pytest-asyncio", specifier = ">=0.23.2,<2.0.0" }, - { name = "pytest-cov", specifier = ">=4.0.0,<8.0.0" }, - { name = "pytest-mock" }, - { name = "pytest-socket", specifier = ">=0.6.0,<1.0.0" }, - { name = "pytest-watcher", specifier = ">=0.2.6,<1.0.0" }, - { name = "pytest-xdist", specifier = ">=3.6.1,<4.0.0" }, - { name = "syrupy", specifier = ">=4.0.2,<5.0.0" }, - { name = "toml", specifier = ">=0.10.2,<1.0.0" }, -] -test-integration = [{ name = "langchain-core", editable = "." }] -typing = [ - { name = "mypy", specifier = ">=1.18.1,<1.19.0" }, - { name = "types-toml", specifier = ">=0.10.8.20240310,<1.0.0.0" }, -] - [[package]] name = "langchain-tests" version = "1.0.1" diff --git a/libs/langchain_v1/langchain/agents/factory.py b/libs/langchain_v1/langchain/agents/factory.py index eb07787929124..673ac347dc6f3 100644 --- a/libs/langchain_v1/langchain/agents/factory.py +++ b/libs/langchain_v1/langchain/agents/factory.py @@ -64,7 +64,7 @@ STRUCTURED_OUTPUT_ERROR_TEMPLATE = "Error: {error}\n Please fix your mistakes." FALLBACK_MODELS_WITH_STRUCTURED_OUTPUT = [ - # if langchain-model-profiles is not installed, these models are assumed to support + # if model profile data are not available, these models are assumed to support # structured output "grok", "gpt-5", @@ -381,18 +381,15 @@ def _supports_provider_strategy(model: str | BaseChatModel, tools: list | None = or getattr(model, "model", None) or getattr(model, "model_id", "") ) - try: - model_profile = model.profile - except ImportError: - pass - else: - if ( - model_profile.get("structured_output") - # We make an exception for Gemini models, which currently do not support - # simultaneous tool use with structured output - and not (tools and isinstance(model_name, str) and "gemini" in model_name.lower()) - ): - return True + model_profile = model.profile + if ( + model_profile is not None + and model_profile.get("structured_output") + # We make an exception for Gemini models, which currently do not support + # simultaneous tool use with structured output + and not (tools and isinstance(model_name, str) and "gemini" in model_name.lower()) + ): + return True return ( any(part in model_name.lower() for part in FALLBACK_MODELS_WITH_STRUCTURED_OUTPUT) diff --git a/libs/langchain_v1/langchain/agents/middleware/summarization.py b/libs/langchain_v1/langchain/agents/middleware/summarization.py index 83e16a3950a2a..8bc1bf260455b 100644 --- a/libs/langchain_v1/langchain/agents/middleware/summarization.py +++ b/libs/langchain_v1/langchain/agents/middleware/summarization.py @@ -159,9 +159,11 @@ def __init__( requires_profile = True if requires_profile and self._get_profile_limits() is None: msg = ( - "Model profile information is required to use fractional token limits. " - 'pip install "langchain[model-profiles]" or use absolute token counts ' - "instead." + "Model profile information is required to use fractional token limits, " + "and is unavailable for the specified model. Please use absolute token " + "counts instead, or pass " + '`\n\nChatModel(..., profile={"max_input_tokens": ...})`.\n\n' + "with a desired integer value of the model's maximum input tokens." ) raise ValueError(msg) @@ -308,7 +310,7 @@ def _get_profile_limits(self) -> int | None: """Retrieve max input token limit from the model profile.""" try: profile = self.model.profile - except (AttributeError, ImportError): + except AttributeError: return None if not isinstance(profile, Mapping): diff --git a/libs/langchain_v1/pyproject.toml b/libs/langchain_v1/pyproject.toml index 07518952b60f2..d1cc8922abf1b 100644 --- a/libs/langchain_v1/pyproject.toml +++ b/libs/langchain_v1/pyproject.toml @@ -18,7 +18,6 @@ dependencies = [ ] [project.optional-dependencies] -model-profiles = ["langchain-model-profiles"] community = ["langchain-community"] anthropic = ["langchain-anthropic"] openai = ["langchain-openai"] @@ -57,7 +56,6 @@ test = [ "pytest-mock", "syrupy>=4.0.2,<5.0.0", "toml>=0.10.2,<1.0.0", - "langchain-model-profiles", "langchain-tests", "langchain-openai", ] @@ -76,7 +74,6 @@ test_integration = [ "cassio>=0.1.0,<1.0.0", "langchainhub>=0.1.16,<1.0.0", "langchain-core", - "langchain-model-profiles", "langchain-text-splitters", ] @@ -85,7 +82,6 @@ prerelease = "allow" [tool.uv.sources] langchain-core = { path = "../core", editable = true } -langchain-model-profiles = { path = "../model-profiles", editable = true } langchain-tests = { path = "../standard-tests", editable = true } langchain-text-splitters = { path = "../text-splitters", editable = true } langchain-openai = { path = "../partners/openai", editable = true } diff --git a/libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_summarization.py b/libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_summarization.py index 84c67b0402c96..483426722c5ea 100644 --- a/libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_summarization.py +++ b/libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_summarization.py @@ -3,6 +3,7 @@ import pytest from langchain_core.language_models.chat_models import BaseChatModel +from langchain_core.language_models.profile import ModelProfile from langchain_core.messages import AIMessage, AnyMessage, HumanMessage, RemoveMessage, ToolMessage from langchain_core.outputs import ChatGeneration, ChatResult from langgraph.graph.message import REMOVE_ALL_MESSAGES @@ -11,9 +12,6 @@ from ...model import FakeToolCallingModel -if TYPE_CHECKING: - from langchain_model_profiles import ModelProfile - class MockChatModel(BaseChatModel): """Mock chat model for testing.""" @@ -35,14 +33,12 @@ class ProfileChatModel(BaseChatModel): def _generate(self, messages, **kwargs): # type: ignore[no-untyped-def] return ChatResult(generations=[ChatGeneration(message=AIMessage(content="Summary"))]) + profile: ModelProfile | None = {"max_input_tokens": 1000} + @property def _llm_type(self) -> str: return "mock" - @property - def profile(self) -> "ModelProfile": - return {"max_input_tokens": 1000} - def test_summarization_middleware_initialization() -> None: """Test SummarizationMiddleware initialization.""" diff --git a/libs/langchain_v1/uv.lock b/libs/langchain_v1/uv.lock index c9157176b917d..a1bd082f47797 100644 --- a/libs/langchain_v1/uv.lock +++ b/libs/langchain_v1/uv.lock @@ -1967,9 +1967,6 @@ huggingface = [ mistralai = [ { name = "langchain-mistralai" }, ] -model-profiles = [ - { name = "langchain-model-profiles" }, -] ollama = [ { name = "langchain-ollama" }, ] @@ -1991,7 +1988,6 @@ lint = [ { name = "ruff" }, ] test = [ - { name = "langchain-model-profiles" }, { name = "langchain-openai" }, { name = "langchain-tests" }, { name = "pytest" }, @@ -2007,7 +2003,6 @@ test = [ test-integration = [ { name = "cassio" }, { name = "langchain-core" }, - { name = "langchain-model-profiles" }, { name = "langchain-text-splitters" }, { name = "langchainhub" }, { name = "python-dotenv" }, @@ -2033,7 +2028,6 @@ requires-dist = [ { name = "langchain-groq", marker = "extra == 'groq'" }, { name = "langchain-huggingface", marker = "extra == 'huggingface'" }, { name = "langchain-mistralai", marker = "extra == 'mistralai'" }, - { name = "langchain-model-profiles", marker = "extra == 'model-profiles'", editable = "../model-profiles" }, { name = "langchain-ollama", marker = "extra == 'ollama'" }, { name = "langchain-openai", marker = "extra == 'openai'", editable = "../partners/openai" }, { name = "langchain-perplexity", marker = "extra == 'perplexity'" }, @@ -2042,12 +2036,11 @@ requires-dist = [ { name = "langgraph", specifier = ">=1.0.2,<1.1.0" }, { name = "pydantic", specifier = ">=2.7.4,<3.0.0" }, ] -provides-extras = ["model-profiles", "community", "anthropic", "openai", "azure-ai", "google-vertexai", "google-genai", "fireworks", "ollama", "together", "mistralai", "huggingface", "groq", "aws", "deepseek", "xai", "perplexity"] +provides-extras = ["community", "anthropic", "openai", "azure-ai", "google-vertexai", "google-genai", "fireworks", "ollama", "together", "mistralai", "huggingface", "groq", "aws", "deepseek", "xai", "perplexity"] [package.metadata.requires-dev] lint = [{ name = "ruff", specifier = ">=0.12.2,<0.13.0" }] test = [ - { name = "langchain-model-profiles", editable = "../model-profiles" }, { name = "langchain-openai", editable = "../partners/openai" }, { name = "langchain-tests", editable = "../standard-tests" }, { name = "pytest", specifier = ">=8.0.0,<9.0.0" }, @@ -2063,7 +2056,6 @@ test = [ test-integration = [ { name = "cassio", specifier = ">=0.1.0,<1.0.0" }, { name = "langchain-core", editable = "../core" }, - { name = "langchain-model-profiles", editable = "../model-profiles" }, { name = "langchain-text-splitters", editable = "../text-splitters" }, { name = "langchainhub", specifier = ">=0.1.16,<1.0.0" }, { name = "python-dotenv", specifier = ">=1.0.0,<2.0.0" }, @@ -2174,7 +2166,7 @@ wheels = [ [[package]] name = "langchain-core" -version = "1.0.5" +version = "1.0.7" source = { editable = "../core" } dependencies = [ { name = "jsonpatch" }, @@ -2208,7 +2200,6 @@ test = [ { name = "blockbuster", specifier = ">=1.5.18,<1.6.0" }, { name = "freezegun", specifier = ">=1.2.2,<2.0.0" }, { name = "grandalf", specifier = ">=0.8.0,<1.0.0" }, - { name = "langchain-model-profiles", directory = "../model-profiles" }, { name = "langchain-tests", directory = "../standard-tests" }, { name = "numpy", marker = "python_full_version < '3.13'", specifier = ">=1.26.4" }, { name = "numpy", marker = "python_full_version >= '3.13'", specifier = ">=2.1.0" }, @@ -2225,7 +2216,6 @@ test = [ ] test-integration = [] typing = [ - { name = "langchain-model-profiles", directory = "../model-profiles" }, { name = "langchain-text-splitters", directory = "../text-splitters" }, { name = "mypy", specifier = ">=1.18.1,<1.19.0" }, { name = "types-pyyaml", specifier = ">=6.0.12.2,<7.0.0.0" }, @@ -2340,46 +2330,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e6/5e/d1ed75e38ce431c49b609a524fc178ecbc38cc0a3ba44b5c3b935d82d824/langchain_mistralai-1.0.1-py3-none-any.whl", hash = "sha256:1777de4ceef3d3d5b2d08ab7cf6ce2d27188469eeae4d09756fd3b08ea3751a6", size = 17843, upload-time = "2025-10-24T13:55:39.358Z" }, ] -[[package]] -name = "langchain-model-profiles" -version = "0.0.4" -source = { editable = "../model-profiles" } -dependencies = [ - { name = "tomli", marker = "python_full_version < '3.11'" }, - { name = "typing-extensions" }, -] - -[package.metadata] -requires-dist = [ - { name = "tomli", marker = "python_full_version < '3.11'", specifier = ">=2.0.0,<3.0.0" }, - { name = "typing-extensions", specifier = ">=4.7.0,<5.0.0" }, -] - -[package.metadata.requires-dev] -dev = [{ name = "httpx", specifier = ">=0.23.0,<1" }] -lint = [ - { name = "langchain", editable = "." }, - { name = "ruff", specifier = ">=0.12.2,<0.13.0" }, -] -test = [ - { name = "langchain", extras = ["openai"], editable = "." }, - { name = "langchain-core", editable = "../core" }, - { name = "pytest", specifier = ">=8.0.0,<9.0.0" }, - { name = "pytest-asyncio", specifier = ">=0.23.2,<2.0.0" }, - { name = "pytest-cov", specifier = ">=4.0.0,<8.0.0" }, - { name = "pytest-mock" }, - { name = "pytest-socket", specifier = ">=0.6.0,<1.0.0" }, - { name = "pytest-watcher", specifier = ">=0.2.6,<1.0.0" }, - { name = "pytest-xdist", specifier = ">=3.6.1,<4.0.0" }, - { name = "syrupy", specifier = ">=4.0.2,<5.0.0" }, - { name = "toml", specifier = ">=0.10.2,<1.0.0" }, -] -test-integration = [{ name = "langchain-core", editable = "../core" }] -typing = [ - { name = "mypy", specifier = ">=1.18.1,<1.19.0" }, - { name = "types-toml", specifier = ">=0.10.8.20240310,<1.0.0.0" }, -] - [[package]] name = "langchain-ollama" version = "1.0.0" @@ -2395,7 +2345,7 @@ wheels = [ [[package]] name = "langchain-openai" -version = "1.0.2" +version = "1.0.3" source = { editable = "../partners/openai" } dependencies = [ { name = "langchain-core" }, diff --git a/libs/model-profiles/README.md b/libs/model-profiles/README.md index d1c9ee49c7a7d..765b63d8cc3a7 100644 --- a/libs/model-profiles/README.md +++ b/libs/model-profiles/README.md @@ -8,55 +8,36 @@ > [!WARNING] > This package is currently in development and the API is subject to change. -Centralized reference of LLM capabilities for LangChain chat models. +CLI tool for updating model profile data in LangChain integration packages. ## Quick Install ```bash -pip install "langchain[model-profiles]" +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. +`langchain-model-profiles` is a CLI tool for fetching and updating model capability data from [models.dev](https://github.com/sst/models.dev) for use in LangChain integration packages. -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](https://reference.langchain.com/python/langchain_model_profiles/). For conceptual guides, tutorials, and examples on using LangChain, see the [LangChain Docs](https://docs.langchain.com/oss/python/langchain/overview). - ---- +LangChain chat models expose a `.profile` property that provides programmatic access to model capabilities such as context window sizes, supported modalities, tool calling, structured output, and more. This CLI tool helps maintainers keep that data up-to-date. ## Data sources This package is built on top of the excellent work by the [models.dev](https://github.com/sst/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: - -```python -# pip install "langchain[openai]" +LangChain model profiles augment the data from models.dev with some additional fields. We intend to keep this aligned with the upstream project as it evolves. -from langchain.chat_models import init_chat_model +## 📖 Documentation -model = init_chat_model("openai:gpt-5") -profile = model.profile +For full documentation, see the [API reference](https://reference.langchain.com/python/langchain_model_profiles/). For conceptual guides, tutorials, and examples on using LangChain, see the [LangChain Docs](https://docs.langchain.com/oss/python/langchain/overview). -# Check specific capabilities -if profile.get("structured_output"): - print(f"This model supports a dedicated structured output feature.") +## Usage -if profile.get("max_input_tokens"): - print(f"Max input tokens: {profile.get('max_input_tokens')}") +Update model data for a specific provider: -if profile.get("..."): - ... +```bash +langchain-profiles refresh --provider anthropic --output ./langchain_anthropic/data/models.json ``` -## Available fields - -See `ModelProfile` in [`model_profile.py`](./langchain_model_profiles/model_profile.py) for the full list of available fields and their descriptions. +This downloads the latest model data from models.dev and saves it to the specified location. diff --git a/libs/model-profiles/langchain_model_profiles/__init__.py b/libs/model-profiles/langchain_model_profiles/__init__.py index a8d06e38267cf..e69de29bb2d1d 100644 --- a/libs/model-profiles/langchain_model_profiles/__init__.py +++ b/libs/model-profiles/langchain_model_profiles/__init__.py @@ -1,8 +0,0 @@ -"""Model profiles entrypoint.""" - -from langchain_model_profiles.model_profile import ModelProfile, get_model_profile - -__all__ = [ - "ModelProfile", - "get_model_profile", -] diff --git a/libs/model-profiles/langchain_model_profiles/_data_loader.py b/libs/model-profiles/langchain_model_profiles/_data_loader.py deleted file mode 100644 index 478314244ecd5..0000000000000 --- a/libs/model-profiles/langchain_model_profiles/_data_loader.py +++ /dev/null @@ -1,141 +0,0 @@ -"""Data loader for model profiles with augmentation support.""" - -import json -import sys -from functools import cached_property -from pathlib import Path -from typing import Any - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - - -class _DataLoader: - """Loads and merges model profile data from base and augmentations. - - See the README in `data/augmentations` directory for more details on the - augmentation structure and merge priority. - """ - - def __init__(self) -> None: - """Initialize the loader.""" - self._data_dir = Path(__file__).parent / "data" - - @property - def _base_data_path(self) -> Path: - """Get path to base data file. - - `models.json` is the downloaded data from models.dev. - """ - return self._data_dir / "models.json" - - @property - def _augmentations_dir(self) -> Path: - """Get path to augmentations directory.""" - return self._data_dir / "augmentations" - - @cached_property - def _merged_data(self) -> dict[str, Any]: - """Load and merge all data once at startup. - - Merging order: - - 1. Base data from `models.json` - 2. Provider-level augmentations from `augmentations/providers/{provider}.toml` - 3. Model-level augmentations from `augmentations/models/{provider}/{model}.toml` - - Returns: - Fully merged provider data with all augmentations applied. - """ - # Load base data; let exceptions propagate to user - with self._base_data_path.open("r") as f: - data = json.load(f) - - provider_augmentations = self._load_provider_augmentations() - model_augmentations = self._load_model_augmentations() - - # Merge contents - for provider_id, provider_data in data.items(): - models = provider_data.get("models", {}) - provider_aug = provider_augmentations.get(provider_id, {}) - - for model_id, model_data in models.items(): - if provider_aug: - model_data.update(provider_aug) - - # Apply model-level augmentations (highest priority) - model_aug = model_augmentations.get(provider_id, {}).get(model_id, {}) - if model_aug: - model_data.update(model_aug) - - return data - - def _load_provider_augmentations(self) -> dict[str, dict[str, Any]]: - """Load all provider-level augmentations. - - Returns: - `dict` mapping provider IDs to their augmentation data. - """ - augmentations: dict[str, dict[str, Any]] = {} - providers_dir = self._augmentations_dir / "providers" - - if not providers_dir.exists(): - return augmentations - - for toml_file in providers_dir.glob("*.toml"): - provider_id = toml_file.stem - with toml_file.open("rb") as f: - data = tomllib.load(f) - if "profile" in data: - augmentations[provider_id] = data["profile"] - - return augmentations - - def _load_model_augmentations(self) -> dict[str, dict[str, dict[str, Any]]]: - """Load all model-level augmentations. - - Returns: - Nested `dict`: `provider_id` -> `model_id` -> augmentation data. - """ - augmentations: dict[str, dict[str, dict[str, Any]]] = {} - models_dir = self._augmentations_dir / "models" - - if not models_dir.exists(): - return augmentations - - for provider_dir in models_dir.iterdir(): - if not provider_dir.is_dir(): - continue - - provider_id = provider_dir.name - augmentations[provider_id] = {} - - for toml_file in provider_dir.glob("*.toml"): - model_id = toml_file.stem - with toml_file.open("rb") as f: - data = tomllib.load(f) - if "profile" in data: - augmentations[provider_id][model_id] = data["profile"] - - return augmentations - - def get_profile_data( - self, provider_id: str, model_id: str - ) -> dict[str, Any] | None: - """Get merged profile data for a specific model. - - Args: - provider_id: The provider identifier. - model_id: The model identifier. - - Returns: - Merged model data `dict` or `None` if not found. - """ - provider = self._merged_data.get(provider_id) - if provider is None: - return None - - models = provider.get("models", {}) - return models.get(model_id) diff --git a/libs/model-profiles/langchain_model_profiles/cli.py b/libs/model-profiles/langchain_model_profiles/cli.py new file mode 100644 index 0000000000000..bfa0d2c722b0a --- /dev/null +++ b/libs/model-profiles/langchain_model_profiles/cli.py @@ -0,0 +1,92 @@ +"""CLI for refreshing model profile data from models.dev.""" + +import argparse +import json +import sys +from pathlib import Path + +import httpx + + +def refresh(provider: str, output: Path) -> None: + """Download and save model data from models.dev for a specific provider. + + Args: + provider: Provider ID from models.dev (e.g., 'anthropic', 'openai'). + output: Output path for the models.json file. + """ + api_url = "https://models.dev/api.json" + + print(f"Provider: {provider}") # noqa: T201 + print(f"Output path: {output}") # noqa: T201 + print() # noqa: T201 + + # Download data from models.dev + print(f"Downloading data from {api_url}...") # noqa: T201 + response = httpx.get(api_url, timeout=30) + response.raise_for_status() + + all_data = response.json() + + # Basic validation + if not isinstance(all_data, dict): + msg = "Expected API response to be a dictionary" + raise TypeError(msg) + + provider_count = len(all_data) + model_count = sum(len(p.get("models", {})) for p in all_data.values()) + print(f"Downloaded {provider_count} providers with {model_count} models") # noqa: T201 + + # Extract data for this provider + if provider not in all_data: + msg = f"Provider '{provider}' not found in models.dev data" + print(msg, file=sys.stderr) # noqa: T201 + sys.exit(1) + + provider_data = {provider: all_data[provider]} + provider_model_count = len(provider_data[provider].get("models", {})) + print(f"Extracted {provider_model_count} models for {provider}") # noqa: T201 + + # Ensure directory exists + output.parent.mkdir(parents=True, exist_ok=True) + + # Write with pretty formatting for readability + print(f"Writing to {output}...") # noqa: T201 + with output.open("w") as f: + json.dump(provider_data, f, indent=2, sort_keys=True) + + print(f"✓ Successfully refreshed model data ({output.stat().st_size:,} bytes)") # noqa: T201 + + +def main() -> None: + """CLI entrypoint.""" + parser = argparse.ArgumentParser( + description="Refresh model profile data from models.dev", + prog="langchain-profiles", + ) + subparsers = parser.add_subparsers(dest="command", required=True) + + # refresh command + refresh_parser = subparsers.add_parser( + "refresh", help="Download and save model data for a provider" + ) + refresh_parser.add_argument( + "--provider", + required=True, + help="Provider ID from models.dev (e.g., 'anthropic', 'openai', 'google')", + ) + refresh_parser.add_argument( + "--output", + required=True, + type=Path, + help="Output path for models.json file", + ) + + args = parser.parse_args() + + if args.command == "refresh": + refresh(args.provider, args.output) + + +if __name__ == "__main__": + main() diff --git a/libs/model-profiles/langchain_model_profiles/data/ATTRIBUTION.txt b/libs/model-profiles/langchain_model_profiles/data/ATTRIBUTION.txt deleted file mode 100644 index a8a6ea7a58072..0000000000000 --- a/libs/model-profiles/langchain_model_profiles/data/ATTRIBUTION.txt +++ /dev/null @@ -1,11 +0,0 @@ -Data Attribution -================ - -The models.json file in this directory contains data derived from the models.dev project. - -Source: https://github.com/sst/models.dev -Copyright (c) 2025 models.dev contributors -License: MIT License - -This package augments the original models.dev data with additional fields -specific to LangChain integration. diff --git a/libs/model-profiles/langchain_model_profiles/data/augmentations/README.md b/libs/model-profiles/langchain_model_profiles/data/augmentations/README.md deleted file mode 100644 index a4e93683d7294..0000000000000 --- a/libs/model-profiles/langchain_model_profiles/data/augmentations/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Profile augmentations - -This directory contains LangChain-specific augmentations to the base model data from models.dev. - -## Structure - -```txt -augmentations/ -├── providers/ # Provider-level augmentations (apply to all models from a provider) -│ ├── anthropic.toml -│ ├── openai.toml -│ └── ... -└── models/ # Model-specific augmentations (override provider defaults) - ├── anthropic/ - │ └── claude-sonnet-4-5-20250929.toml - └── openai/ - └── o1.toml -``` - -## Merge priority - -Data is merged in the following order (later overrides earlier): - -1. Base data from `models.json` (from models.dev API) -2. Provider-level augmentations from `augmentations/providers/{provider}.toml` -3. Model-level augmentations from `augmentations/models/{provider}/{model}.toml` - -## TOML format - -All augmentation files should use the following structure: - -```toml -[profile] -# Add or override model profile fields -image_url_inputs = true -pdf_inputs = true -tool_choice = true -``` - -Available fields match the `ModelProfile` TypedDict in `model_profile.py`. diff --git a/libs/model-profiles/langchain_model_profiles/data/augmentations/models/openai/gpt-3.5-turbo.toml b/libs/model-profiles/langchain_model_profiles/data/augmentations/models/openai/gpt-3.5-turbo.toml deleted file mode 100644 index 0997583426ccb..0000000000000 --- a/libs/model-profiles/langchain_model_profiles/data/augmentations/models/openai/gpt-3.5-turbo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[profile] -image_url_inputs = false -pdf_inputs = false -pdf_tool_message = false -image_tool_message = false -structured_output = false diff --git a/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/amazon-bedrock.toml b/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/amazon-bedrock.toml deleted file mode 100644 index 658df1dafdbe3..0000000000000 --- a/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/amazon-bedrock.toml +++ /dev/null @@ -1,6 +0,0 @@ -[profile] -image_url_inputs = true -pdf_inputs = true -pdf_tool_message = true -image_tool_message = true -structured_output = false diff --git a/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/anthropic.toml b/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/anthropic.toml deleted file mode 100644 index 658df1dafdbe3..0000000000000 --- a/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/anthropic.toml +++ /dev/null @@ -1,6 +0,0 @@ -[profile] -image_url_inputs = true -pdf_inputs = true -pdf_tool_message = true -image_tool_message = true -structured_output = false diff --git a/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/google.toml b/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/google.toml deleted file mode 100644 index 3b652c5d00091..0000000000000 --- a/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/google.toml +++ /dev/null @@ -1,6 +0,0 @@ -[profile] -image_url_inputs = true -pdf_inputs = true -image_tool_message = true -tool_choice = true -structured_output = true diff --git a/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/google_vertexai.toml b/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/google_vertexai.toml deleted file mode 100644 index 3b652c5d00091..0000000000000 --- a/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/google_vertexai.toml +++ /dev/null @@ -1,6 +0,0 @@ -[profile] -image_url_inputs = true -pdf_inputs = true -image_tool_message = true -tool_choice = true -structured_output = true diff --git a/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/openai.toml b/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/openai.toml deleted file mode 100644 index 305eeefd01360..0000000000000 --- a/libs/model-profiles/langchain_model_profiles/data/augmentations/providers/openai.toml +++ /dev/null @@ -1,7 +0,0 @@ -[profile] -image_url_inputs = true -pdf_inputs = true -pdf_tool_message = true -image_tool_message = true -tool_choice = true -structured_output = true diff --git a/libs/model-profiles/langchain_model_profiles/data/models.json b/libs/model-profiles/langchain_model_profiles/data/models.json deleted file mode 100644 index 1043b6b7e2aa7..0000000000000 --- a/libs/model-profiles/langchain_model_profiles/data/models.json +++ /dev/null @@ -1,14799 +0,0 @@ -{ - "amazon-bedrock": { - "doc": "https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html", - "env": [ - "AWS_ACCESS_KEY_ID", - "AWS_SECRET_ACCESS_KEY", - "AWS_REGION" - ], - "id": "amazon-bedrock", - "models": { - "ai21.jamba-1-5-large-v1:0": { - "attachment": false, - "cost": { - "input": 2, - "output": 8 - }, - "id": "ai21.jamba-1-5-large-v1:0", - "knowledge": "2024-08", - "last_updated": "2024-08-15", - "limit": { - "context": 256000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Jamba 1.5 Large", - "open_weights": true, - "reasoning": false, - "release_date": "2024-08-15", - "temperature": true, - "tool_call": true - }, - "ai21.jamba-1-5-mini-v1:0": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.4 - }, - "id": "ai21.jamba-1-5-mini-v1:0", - "knowledge": "2024-08", - "last_updated": "2024-08-15", - "limit": { - "context": 256000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Jamba 1.5 Mini", - "open_weights": true, - "reasoning": false, - "release_date": "2024-08-15", - "temperature": true, - "tool_call": true - }, - "amazon.nova-lite-v1:0": { - "attachment": true, - "cost": { - "cache_read": 0.015, - "input": 0.06, - "output": 0.24 - }, - "id": "amazon.nova-lite-v1:0", - "knowledge": "2024-10", - "last_updated": "2024-12-03", - "limit": { - "context": 300000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "video" - ], - "output": [ - "text" - ] - }, - "name": "Nova Lite", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-03", - "temperature": true, - "tool_call": true - }, - "amazon.nova-micro-v1:0": { - "attachment": false, - "cost": { - "cache_read": 0.00875, - "input": 0.035, - "output": 0.14 - }, - "id": "amazon.nova-micro-v1:0", - "knowledge": "2024-10", - "last_updated": "2024-12-03", - "limit": { - "context": 128000, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Nova Micro", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-03", - "temperature": true, - "tool_call": true - }, - "amazon.nova-premier-v1:0": { - "attachment": true, - "cost": { - "input": 2.5, - "output": 12.5 - }, - "id": "amazon.nova-premier-v1:0", - "knowledge": "2024-10", - "last_updated": "2024-12-03", - "limit": { - "context": 1000000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image", - "video" - ], - "output": [ - "text" - ] - }, - "name": "Nova Premier", - "open_weights": false, - "reasoning": true, - "release_date": "2024-12-03", - "temperature": true, - "tool_call": true - }, - "amazon.nova-pro-v1:0": { - "attachment": true, - "cost": { - "cache_read": 0.2, - "input": 0.8, - "output": 3.2 - }, - "id": "amazon.nova-pro-v1:0", - "knowledge": "2024-10", - "last_updated": "2024-12-03", - "limit": { - "context": 300000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "video" - ], - "output": [ - "text" - ] - }, - "name": "Nova Pro", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-03", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-3-5-haiku-20241022-v1:0": { - "attachment": true, - "cost": { - "cache_read": 0.08, - "cache_write": 1, - "input": 0.8, - "output": 4 - }, - "id": "anthropic.claude-3-5-haiku-20241022-v1:0", - "knowledge": "2024-07", - "last_updated": "2024-10-22", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 3.5", - "open_weights": false, - "reasoning": false, - "release_date": "2024-10-22", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-3-5-sonnet-20240620-v1:0": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "anthropic.claude-3-5-sonnet-20240620-v1:0", - "knowledge": "2024-04", - "last_updated": "2024-06-20", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3.5", - "open_weights": false, - "reasoning": false, - "release_date": "2024-06-20", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-3-5-sonnet-20241022-v2:0": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "anthropic.claude-3-5-sonnet-20241022-v2:0", - "knowledge": "2024-04", - "last_updated": "2024-10-22", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3.5 v2", - "open_weights": false, - "reasoning": false, - "release_date": "2024-10-22", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-3-7-sonnet-20250219-v1:0": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "anthropic.claude-3-7-sonnet-20250219-v1:0", - "knowledge": "2024-04", - "last_updated": "2025-02-19", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3.7", - "open_weights": false, - "reasoning": false, - "release_date": "2025-02-19", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-3-haiku-20240307-v1:0": { - "attachment": true, - "cost": { - "input": 0.25, - "output": 1.25 - }, - "id": "anthropic.claude-3-haiku-20240307-v1:0", - "knowledge": "2024-02", - "last_updated": "2024-03-13", - "limit": { - "context": 200000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 3", - "open_weights": false, - "reasoning": false, - "release_date": "2024-03-13", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-3-opus-20240229-v1:0": { - "attachment": true, - "cost": { - "input": 15, - "output": 75 - }, - "id": "anthropic.claude-3-opus-20240229-v1:0", - "knowledge": "2023-08", - "last_updated": "2024-02-29", - "limit": { - "context": 200000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 3", - "open_weights": false, - "reasoning": false, - "release_date": "2024-02-29", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-3-sonnet-20240229-v1:0": { - "attachment": true, - "cost": { - "input": 3, - "output": 15 - }, - "id": "anthropic.claude-3-sonnet-20240229-v1:0", - "knowledge": "2023-08", - "last_updated": "2024-03-04", - "limit": { - "context": 200000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3", - "open_weights": false, - "reasoning": false, - "release_date": "2024-03-04", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-haiku-4-5-20251001-v1:0": { - "attachment": true, - "cost": { - "cache_read": 0.1, - "cache_write": 1.25, - "input": 1, - "output": 5 - }, - "id": "anthropic.claude-haiku-4-5-20251001-v1:0", - "knowledge": "2025-02-28", - "last_updated": "2025-10-15", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 4.5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-10-15", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-instant-v1": { - "attachment": false, - "cost": { - "input": 0.8, - "output": 2.4 - }, - "id": "anthropic.claude-instant-v1", - "knowledge": "2023-08", - "last_updated": "2023-03-01", - "limit": { - "context": 100000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Claude Instant", - "open_weights": false, - "reasoning": false, - "release_date": "2023-03-01", - "temperature": true, - "tool_call": false - }, - "anthropic.claude-opus-4-1-20250805-v1:0": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "anthropic.claude-opus-4-1-20250805-v1:0", - "knowledge": "2025-03-31", - "last_updated": "2025-08-05", - "limit": { - "context": 200000, - "output": 32000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 4.1", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-opus-4-20250514-v1:0": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "anthropic.claude-opus-4-20250514-v1:0", - "knowledge": "2024-04", - "last_updated": "2025-05-22", - "limit": { - "context": 200000, - "output": 32000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 4", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-22", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-sonnet-4-20250514-v1:0": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "anthropic.claude-sonnet-4-20250514-v1:0", - "knowledge": "2024-04", - "last_updated": "2025-05-22", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 4", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-22", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-sonnet-4-5-20250929-v1:0": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "anthropic.claude-sonnet-4-5-20250929-v1:0", - "knowledge": "2025-07-31", - "last_updated": "2025-09-29", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 4.5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-29", - "temperature": true, - "tool_call": true - }, - "anthropic.claude-v2": { - "attachment": false, - "cost": { - "input": 8, - "output": 24 - }, - "id": "anthropic.claude-v2", - "knowledge": "2023-08", - "last_updated": "2023-07-11", - "limit": { - "context": 100000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Claude 2", - "open_weights": false, - "reasoning": false, - "release_date": "2023-07-11", - "temperature": true, - "tool_call": false - }, - "anthropic.claude-v2:1": { - "attachment": false, - "cost": { - "input": 8, - "output": 24 - }, - "id": "anthropic.claude-v2:1", - "knowledge": "2023-08", - "last_updated": "2023-11-21", - "limit": { - "context": 200000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Claude 2.1", - "open_weights": false, - "reasoning": false, - "release_date": "2023-11-21", - "temperature": true, - "tool_call": false - }, - "cohere.command-light-text-v14": { - "attachment": false, - "cost": { - "input": 0.3, - "output": 0.6 - }, - "id": "cohere.command-light-text-v14", - "knowledge": "2023-08", - "last_updated": "2023-11-01", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Command Light", - "open_weights": true, - "reasoning": false, - "release_date": "2023-11-01", - "temperature": true, - "tool_call": false - }, - "cohere.command-r-plus-v1:0": { - "attachment": false, - "cost": { - "input": 3, - "output": 15 - }, - "id": "cohere.command-r-plus-v1:0", - "knowledge": "2024-04", - "last_updated": "2024-04-04", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Command R+", - "open_weights": true, - "reasoning": false, - "release_date": "2024-04-04", - "temperature": true, - "tool_call": true - }, - "cohere.command-r-v1:0": { - "attachment": false, - "cost": { - "input": 0.5, - "output": 1.5 - }, - "id": "cohere.command-r-v1:0", - "knowledge": "2024-04", - "last_updated": "2024-03-11", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Command R", - "open_weights": true, - "reasoning": false, - "release_date": "2024-03-11", - "temperature": true, - "tool_call": true - }, - "cohere.command-text-v14": { - "attachment": false, - "cost": { - "input": 1.5, - "output": 2 - }, - "id": "cohere.command-text-v14", - "knowledge": "2023-08", - "last_updated": "2023-11-01", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Command", - "open_weights": true, - "reasoning": false, - "release_date": "2023-11-01", - "temperature": true, - "tool_call": false - }, - "deepseek.r1-v1:0": { - "attachment": false, - "cost": { - "input": 1.35, - "output": 5.4 - }, - "id": "deepseek.r1-v1:0", - "knowledge": "2024-07", - "last_updated": "2025-05-29", - "limit": { - "context": 128000, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek-R1", - "open_weights": false, - "reasoning": true, - "release_date": "2025-01-20", - "temperature": true, - "tool_call": true - }, - "deepseek.v3-v1:0": { - "attachment": false, - "cost": { - "input": 0.58, - "output": 1.68 - }, - "id": "deepseek.v3-v1:0", - "knowledge": "2024-07", - "last_updated": "2025-09-18", - "limit": { - "context": 163840, - "output": 81920 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek-V3.1", - "open_weights": true, - "reasoning": true, - "release_date": "2025-09-18", - "temperature": true, - "tool_call": true - }, - "meta.llama3-1-70b-instruct-v1:0": { - "attachment": false, - "cost": { - "input": 0.72, - "output": 0.72 - }, - "id": "meta.llama3-1-70b-instruct-v1:0", - "knowledge": "2023-12", - "last_updated": "2024-07-23", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.1 70B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-23", - "temperature": true, - "tool_call": true - }, - "meta.llama3-1-8b-instruct-v1:0": { - "attachment": false, - "cost": { - "input": 0.22, - "output": 0.22 - }, - "id": "meta.llama3-1-8b-instruct-v1:0", - "knowledge": "2023-12", - "last_updated": "2024-07-23", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.1 8B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-23", - "temperature": true, - "tool_call": true - }, - "meta.llama3-2-11b-instruct-v1:0": { - "attachment": true, - "cost": { - "input": 0.16, - "output": 0.16 - }, - "id": "meta.llama3-2-11b-instruct-v1:0", - "knowledge": "2023-12", - "last_updated": "2024-09-25", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.2 11B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-09-25", - "temperature": true, - "tool_call": true - }, - "meta.llama3-2-1b-instruct-v1:0": { - "attachment": false, - "cost": { - "input": 0.1, - "output": 0.1 - }, - "id": "meta.llama3-2-1b-instruct-v1:0", - "knowledge": "2023-12", - "last_updated": "2024-09-25", - "limit": { - "context": 131000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.2 1B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-09-25", - "temperature": true, - "tool_call": true - }, - "meta.llama3-2-3b-instruct-v1:0": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0.15 - }, - "id": "meta.llama3-2-3b-instruct-v1:0", - "knowledge": "2023-12", - "last_updated": "2024-09-25", - "limit": { - "context": 131000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.2 3B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-09-25", - "temperature": true, - "tool_call": true - }, - "meta.llama3-2-90b-instruct-v1:0": { - "attachment": true, - "cost": { - "input": 0.72, - "output": 0.72 - }, - "id": "meta.llama3-2-90b-instruct-v1:0", - "knowledge": "2023-12", - "last_updated": "2024-09-25", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.2 90B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-09-25", - "temperature": true, - "tool_call": true - }, - "meta.llama3-3-70b-instruct-v1:0": { - "attachment": false, - "cost": { - "input": 0.72, - "output": 0.72 - }, - "id": "meta.llama3-3-70b-instruct-v1:0", - "knowledge": "2023-12", - "last_updated": "2024-12-06", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.3 70B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-12-06", - "temperature": true, - "tool_call": true - }, - "meta.llama3-70b-instruct-v1:0": { - "attachment": false, - "cost": { - "input": 2.65, - "output": 3.5 - }, - "id": "meta.llama3-70b-instruct-v1:0", - "knowledge": "2023-12", - "last_updated": "2024-07-23", - "limit": { - "context": 8192, - "output": 2048 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3 70B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-23", - "temperature": true, - "tool_call": false - }, - "meta.llama3-8b-instruct-v1:0": { - "attachment": false, - "cost": { - "input": 0.3, - "output": 0.6 - }, - "id": "meta.llama3-8b-instruct-v1:0", - "knowledge": "2023-03", - "last_updated": "2024-07-23", - "limit": { - "context": 8192, - "output": 2048 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3 8B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-23", - "temperature": true, - "tool_call": false - }, - "meta.llama4-maverick-17b-instruct-v1:0": { - "attachment": true, - "cost": { - "input": 0.24, - "output": 0.97 - }, - "id": "meta.llama4-maverick-17b-instruct-v1:0", - "knowledge": "2024-08", - "last_updated": "2025-04-05", - "limit": { - "context": 1000000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Llama 4 Maverick 17B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-04-05", - "temperature": true, - "tool_call": true - }, - "meta.llama4-scout-17b-instruct-v1:0": { - "attachment": true, - "cost": { - "input": 0.17, - "output": 0.66 - }, - "id": "meta.llama4-scout-17b-instruct-v1:0", - "knowledge": "2024-08", - "last_updated": "2025-04-05", - "limit": { - "context": 3500000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Llama 4 Scout 17B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-04-05", - "temperature": true, - "tool_call": true - }, - "qwen.qwen3-235b-a22b-2507-v1:0": { - "attachment": false, - "cost": { - "input": 0.22, - "output": 0.88 - }, - "id": "qwen.qwen3-235b-a22b-2507-v1:0", - "knowledge": "2024-04", - "last_updated": "2025-09-18", - "limit": { - "context": 262144, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 235B A22B 2507", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-18", - "temperature": true, - "tool_call": true - }, - "qwen.qwen3-32b-v1:0": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0.6 - }, - "id": "qwen.qwen3-32b-v1:0", - "knowledge": "2024-04", - "last_updated": "2025-09-18", - "limit": { - "context": 16384, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 32B (dense)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-09-18", - "temperature": true, - "tool_call": true - }, - "qwen.qwen3-coder-30b-a3b-v1:0": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0.6 - }, - "id": "qwen.qwen3-coder-30b-a3b-v1:0", - "knowledge": "2024-04", - "last_updated": "2025-09-18", - "limit": { - "context": 262144, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 30B A3B Instruct", - "open_weights": false, - "reasoning": false, - "release_date": "2025-09-18", - "temperature": true, - "tool_call": true - }, - "qwen.qwen3-coder-480b-a35b-v1:0": { - "attachment": false, - "cost": { - "input": 0.22, - "output": 1.8 - }, - "id": "qwen.qwen3-coder-480b-a35b-v1:0", - "knowledge": "2024-04", - "last_updated": "2025-09-18", - "limit": { - "context": 131072, - "output": 65536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 480B A35B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-18", - "temperature": true, - "tool_call": true - } - }, - "name": "Amazon Bedrock", - "npm": "@ai-sdk/amazon-bedrock" - }, - "anthropic": { - "doc": "https://docs.anthropic.com/en/docs/about-claude/models", - "env": [ - "ANTHROPIC_API_KEY" - ], - "id": "anthropic", - "models": { - "claude-3-5-haiku-20241022": { - "attachment": true, - "cost": { - "cache_read": 0.08, - "cache_write": 1, - "input": 0.8, - "output": 4 - }, - "id": "claude-3-5-haiku-20241022", - "knowledge": "2024-07-31", - "last_updated": "2024-10-22", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 3.5", - "open_weights": false, - "reasoning": false, - "release_date": "2024-10-22", - "temperature": true, - "tool_call": true - }, - "claude-3-5-haiku-latest": { - "attachment": true, - "cost": { - "cache_read": 0.08, - "cache_write": 1, - "input": 0.8, - "output": 4 - }, - "id": "claude-3-5-haiku-latest", - "knowledge": "2024-07-31", - "last_updated": "2024-10-22", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 3.5 (latest)", - "open_weights": false, - "reasoning": false, - "release_date": "2024-10-22", - "temperature": true, - "tool_call": true - }, - "claude-3-5-sonnet-20240620": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-3-5-sonnet-20240620", - "knowledge": "2024-04-30", - "last_updated": "2024-06-20", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3.5", - "open_weights": false, - "reasoning": false, - "release_date": "2024-06-20", - "temperature": true, - "tool_call": true - }, - "claude-3-5-sonnet-20241022": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-3-5-sonnet-20241022", - "knowledge": "2024-04-30", - "last_updated": "2024-10-22", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3.5 v2", - "open_weights": false, - "reasoning": false, - "release_date": "2024-10-22", - "temperature": true, - "tool_call": true - }, - "claude-3-7-sonnet-20250219": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-3-7-sonnet-20250219", - "knowledge": "2024-10-31", - "last_updated": "2025-02-19", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3.7", - "open_weights": false, - "reasoning": true, - "release_date": "2025-02-19", - "temperature": true, - "tool_call": true - }, - "claude-3-7-sonnet-latest": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-3-7-sonnet-latest", - "knowledge": "2024-10-31", - "last_updated": "2025-02-19", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3.7 (latest)", - "open_weights": false, - "reasoning": true, - "release_date": "2025-02-19", - "temperature": true, - "tool_call": true - }, - "claude-3-haiku-20240307": { - "attachment": true, - "cost": { - "cache_read": 0.03, - "cache_write": 0.3, - "input": 0.25, - "output": 1.25 - }, - "id": "claude-3-haiku-20240307", - "knowledge": "2023-08-31", - "last_updated": "2024-03-13", - "limit": { - "context": 200000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 3", - "open_weights": false, - "reasoning": false, - "release_date": "2024-03-13", - "temperature": true, - "tool_call": true - }, - "claude-3-opus-20240229": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "claude-3-opus-20240229", - "knowledge": "2023-08-31", - "last_updated": "2024-02-29", - "limit": { - "context": 200000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 3", - "open_weights": false, - "reasoning": false, - "release_date": "2024-02-29", - "temperature": true, - "tool_call": true - }, - "claude-3-sonnet-20240229": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 0.3, - "input": 3, - "output": 15 - }, - "id": "claude-3-sonnet-20240229", - "knowledge": "2023-08-31", - "last_updated": "2024-03-04", - "limit": { - "context": 200000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3", - "open_weights": false, - "reasoning": false, - "release_date": "2024-03-04", - "temperature": true, - "tool_call": true - }, - "claude-haiku-4-5": { - "attachment": true, - "cost": { - "cache_read": 0.1, - "cache_write": 1.25, - "input": 1, - "output": 5 - }, - "id": "claude-haiku-4-5", - "knowledge": "2025-02-31", - "last_updated": "2025-10-15", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 4.5 (latest)", - "open_weights": false, - "reasoning": true, - "release_date": "2025-10-15", - "temperature": true, - "tool_call": true - }, - "claude-haiku-4-5-20251001": { - "attachment": true, - "cost": { - "cache_read": 0.1, - "cache_write": 1.25, - "input": 1, - "output": 5 - }, - "id": "claude-haiku-4-5-20251001", - "knowledge": "2025-02-31", - "last_updated": "2025-10-15", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 4.5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-10-15", - "temperature": true, - "tool_call": true - }, - "claude-opus-4-0": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "claude-opus-4-0", - "knowledge": "2025-03-31", - "last_updated": "2025-05-22", - "limit": { - "context": 200000, - "output": 32000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 4 (latest)", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-22", - "temperature": true, - "tool_call": true - }, - "claude-opus-4-1": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "claude-opus-4-1", - "knowledge": "2025-03-31", - "last_updated": "2025-08-05", - "limit": { - "context": 200000, - "output": 32000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 4.1 (latest)", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "claude-opus-4-1-20250805": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "claude-opus-4-1-20250805", - "knowledge": "2025-03-31", - "last_updated": "2025-08-05", - "limit": { - "context": 200000, - "output": 32000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 4.1", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "claude-opus-4-20250514": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "claude-opus-4-20250514", - "knowledge": "2025-03-31", - "last_updated": "2025-05-22", - "limit": { - "context": 200000, - "output": 32000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 4", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-22", - "temperature": true, - "tool_call": true - }, - "claude-sonnet-4-0": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-sonnet-4-0", - "knowledge": "2025-03-31", - "last_updated": "2025-05-22", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 4 (latest)", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-22", - "temperature": true, - "tool_call": true - }, - "claude-sonnet-4-20250514": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-sonnet-4-20250514", - "knowledge": "2025-03-31", - "last_updated": "2025-05-22", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 4", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-22", - "temperature": true, - "tool_call": true - }, - "claude-sonnet-4-5": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-sonnet-4-5", - "knowledge": "2025-07-31", - "last_updated": "2025-09-29", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 4.5 (latest)", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-29", - "temperature": true, - "tool_call": true - }, - "claude-sonnet-4-5-20250929": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-sonnet-4-5-20250929", - "knowledge": "2025-07-31", - "last_updated": "2025-09-29", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 4.5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-29", - "temperature": true, - "tool_call": true - } - }, - "name": "Anthropic", - "npm": "@ai-sdk/anthropic" - }, - "azure": { - "doc": "https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models", - "env": [ - "AZURE_RESOURCE_NAME", - "AZURE_API_KEY" - ], - "id": "azure", - "models": { - "codex-mini": { - "attachment": true, - "cost": { - "cache_read": 0.375, - "input": 1.5, - "output": 6 - }, - "id": "codex-mini", - "knowledge": "2024-04", - "last_updated": "2025-05-16", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Codex Mini", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-16", - "temperature": false, - "tool_call": true - }, - "gpt-3.5-turbo-0125": { - "attachment": false, - "cost": { - "input": 0.5, - "output": 1.5 - }, - "id": "gpt-3.5-turbo-0125", - "knowledge": "2021-08", - "last_updated": "2024-01-25", - "limit": { - "context": 16384, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT-3.5 Turbo 0125", - "open_weights": false, - "reasoning": false, - "release_date": "2024-01-25", - "temperature": true, - "tool_call": false - }, - "gpt-3.5-turbo-0301": { - "attachment": false, - "cost": { - "input": 1.5, - "output": 2 - }, - "id": "gpt-3.5-turbo-0301", - "knowledge": "2021-08", - "last_updated": "2023-03-01", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT-3.5 Turbo 0301", - "open_weights": false, - "reasoning": false, - "release_date": "2023-03-01", - "temperature": true, - "tool_call": false - }, - "gpt-3.5-turbo-0613": { - "attachment": false, - "cost": { - "input": 3, - "output": 4 - }, - "id": "gpt-3.5-turbo-0613", - "knowledge": "2021-08", - "last_updated": "2023-06-13", - "limit": { - "context": 16384, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT-3.5 Turbo 0613", - "open_weights": false, - "reasoning": false, - "release_date": "2023-06-13", - "temperature": true, - "tool_call": false - }, - "gpt-3.5-turbo-1106": { - "attachment": false, - "cost": { - "input": 1, - "output": 2 - }, - "id": "gpt-3.5-turbo-1106", - "knowledge": "2021-08", - "last_updated": "2023-11-06", - "limit": { - "context": 16384, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT-3.5 Turbo 1106", - "open_weights": false, - "reasoning": false, - "release_date": "2023-11-06", - "temperature": true, - "tool_call": false - }, - "gpt-3.5-turbo-instruct": { - "attachment": false, - "cost": { - "input": 1.5, - "output": 2 - }, - "id": "gpt-3.5-turbo-instruct", - "knowledge": "2021-08", - "last_updated": "2023-09-21", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT-3.5 Turbo Instruct", - "open_weights": false, - "reasoning": false, - "release_date": "2023-09-21", - "temperature": true, - "tool_call": false - }, - "gpt-4": { - "attachment": false, - "cost": { - "input": 60, - "output": 120 - }, - "id": "gpt-4", - "knowledge": "2023-11", - "last_updated": "2023-03-14", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4", - "open_weights": false, - "reasoning": false, - "release_date": "2023-03-14", - "temperature": true, - "tool_call": true - }, - "gpt-4-32k": { - "attachment": false, - "cost": { - "input": 60, - "output": 120 - }, - "id": "gpt-4-32k", - "knowledge": "2023-11", - "last_updated": "2023-03-14", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4 32K", - "open_weights": false, - "reasoning": false, - "release_date": "2023-03-14", - "temperature": true, - "tool_call": true - }, - "gpt-4-turbo": { - "attachment": true, - "cost": { - "input": 10, - "output": 30 - }, - "id": "gpt-4-turbo", - "knowledge": "2023-11", - "last_updated": "2024-04-09", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4 Turbo", - "open_weights": false, - "reasoning": false, - "release_date": "2023-11-06", - "temperature": true, - "tool_call": true - }, - "gpt-4-turbo-vision": { - "attachment": true, - "cost": { - "input": 10, - "output": 30 - }, - "id": "gpt-4-turbo-vision", - "knowledge": "2023-11", - "last_updated": "2024-04-09", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4 Turbo Vision", - "open_weights": false, - "reasoning": false, - "release_date": "2023-11-06", - "temperature": true, - "tool_call": true - }, - "gpt-4.1": { - "attachment": true, - "cost": { - "cache_read": 0.5, - "input": 2, - "output": 8 - }, - "id": "gpt-4.1", - "knowledge": "2024-05", - "last_updated": "2025-04-14", - "limit": { - "context": 1047576, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4.1", - "open_weights": false, - "reasoning": false, - "release_date": "2025-04-14", - "temperature": true, - "tool_call": true - }, - "gpt-4.1-mini": { - "attachment": true, - "cost": { - "cache_read": 0.1, - "input": 0.4, - "output": 1.6 - }, - "id": "gpt-4.1-mini", - "knowledge": "2024-05", - "last_updated": "2025-04-14", - "limit": { - "context": 1047576, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4.1 mini", - "open_weights": false, - "reasoning": false, - "release_date": "2025-04-14", - "temperature": true, - "tool_call": true - }, - "gpt-4.1-nano": { - "attachment": true, - "cost": { - "cache_read": 0.03, - "input": 0.1, - "output": 0.4 - }, - "id": "gpt-4.1-nano", - "knowledge": "2024-05", - "last_updated": "2025-04-14", - "limit": { - "context": 1047576, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4.1 nano", - "open_weights": false, - "reasoning": false, - "release_date": "2025-04-14", - "temperature": true, - "tool_call": true - }, - "gpt-4o": { - "attachment": true, - "cost": { - "cache_read": 1.25, - "input": 2.5, - "output": 10 - }, - "id": "gpt-4o", - "knowledge": "2023-09", - "last_updated": "2024-05-13", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4o", - "open_weights": false, - "reasoning": false, - "release_date": "2024-05-13", - "temperature": true, - "tool_call": true - }, - "gpt-4o-mini": { - "attachment": true, - "cost": { - "cache_read": 0.08, - "input": 0.15, - "output": 0.6 - }, - "id": "gpt-4o-mini", - "knowledge": "2023-09", - "last_updated": "2024-07-18", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4o mini", - "open_weights": false, - "reasoning": false, - "release_date": "2024-07-18", - "temperature": true, - "tool_call": true - }, - "gpt-5": { - "attachment": true, - "cost": { - "cache_read": 0.13, - "input": 1.25, - "output": 10 - }, - "id": "gpt-5", - "knowledge": "2024-09-30", - "last_updated": "2025-08-07", - "limit": { - "context": 272000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": false, - "tool_call": true - }, - "gpt-5-chat": { - "attachment": true, - "cost": { - "cache_read": 0.13, - "input": 1.25, - "output": 10 - }, - "id": "gpt-5-chat", - "knowledge": "2024-10-24", - "last_updated": "2025-08-07", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Chat", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": false, - "tool_call": false - }, - "gpt-5-codex": { - "attachment": false, - "cost": { - "cache_read": 0.13, - "input": 1.25, - "output": 10 - }, - "id": "gpt-5-codex", - "knowledge": "2024-09-30", - "last_updated": "2025-09-15", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5-Codex", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-15", - "temperature": false, - "tool_call": true - }, - "gpt-5-mini": { - "attachment": true, - "cost": { - "cache_read": 0.03, - "input": 0.25, - "output": 2 - }, - "id": "gpt-5-mini", - "knowledge": "2024-05-30", - "last_updated": "2025-08-07", - "limit": { - "context": 272000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Mini", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": false, - "tool_call": true - }, - "gpt-5-nano": { - "attachment": true, - "cost": { - "cache_read": 0.01, - "input": 0.05, - "output": 0.4 - }, - "id": "gpt-5-nano", - "knowledge": "2024-05-30", - "last_updated": "2025-08-07", - "limit": { - "context": 272000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Nano", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": false, - "tool_call": true - }, - "o1": { - "attachment": false, - "cost": { - "cache_read": 7.5, - "input": 15, - "output": 60 - }, - "id": "o1", - "knowledge": "2023-09", - "last_updated": "2024-12-05", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o1", - "open_weights": false, - "reasoning": true, - "release_date": "2024-12-05", - "temperature": false, - "tool_call": true - }, - "o1-mini": { - "attachment": false, - "cost": { - "cache_read": 0.55, - "input": 1.1, - "output": 4.4 - }, - "id": "o1-mini", - "knowledge": "2023-09", - "last_updated": "2024-09-12", - "limit": { - "context": 128000, - "output": 65536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "o1-mini", - "open_weights": false, - "reasoning": true, - "release_date": "2024-09-12", - "temperature": false, - "tool_call": true - }, - "o1-preview": { - "attachment": false, - "cost": { - "cache_read": 8.25, - "input": 16.5, - "output": 66 - }, - "id": "o1-preview", - "knowledge": "2023-09", - "last_updated": "2024-09-12", - "limit": { - "context": 128000, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "o1-preview", - "open_weights": false, - "reasoning": true, - "release_date": "2024-09-12", - "temperature": false, - "tool_call": true - }, - "o3": { - "attachment": true, - "cost": { - "cache_read": 0.5, - "input": 2, - "output": 8 - }, - "id": "o3", - "knowledge": "2024-05", - "last_updated": "2025-04-16", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o3", - "open_weights": false, - "reasoning": true, - "release_date": "2025-04-16", - "temperature": false, - "tool_call": true - }, - "o3-mini": { - "attachment": false, - "cost": { - "cache_read": 0.55, - "input": 1.1, - "output": 4.4 - }, - "id": "o3-mini", - "knowledge": "2024-05", - "last_updated": "2025-01-29", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "o3-mini", - "open_weights": false, - "reasoning": true, - "release_date": "2024-12-20", - "temperature": false, - "tool_call": true - }, - "o4-mini": { - "attachment": true, - "cost": { - "cache_read": 0.28, - "input": 1.1, - "output": 4.4 - }, - "id": "o4-mini", - "knowledge": "2024-05", - "last_updated": "2025-04-16", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o4-mini", - "open_weights": false, - "reasoning": true, - "release_date": "2025-04-16", - "temperature": false, - "tool_call": true - } - }, - "name": "Azure", - "npm": "@ai-sdk/azure" - }, - "baseten": { - "api": "https://inference.baseten.co/v1", - "doc": "https://docs.baseten.co/development/model-apis/overview", - "env": [ - "BASETEN_API_KEY" - ], - "id": "baseten", - "models": { - "Qwen/Qwen3-Coder-480B-A35B-Instruct": { - "attachment": false, - "cost": { - "input": 0.38, - "output": 1.53 - }, - "id": "Qwen/Qwen3-Coder-480B-A35B-Instruct", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 262144, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 480B A35B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "moonshotai/Kimi-K2-Instruct-0905": { - "attachment": false, - "cost": { - "input": 0.6, - "output": 2.5 - }, - "id": "moonshotai/Kimi-K2-Instruct-0905", - "knowledge": "2025-08", - "last_updated": "2025-09-05", - "limit": { - "context": 262144, - "output": 262144 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 Instruct 0905", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-05", - "temperature": true, - "tool_call": true - }, - "zai-org/GLM-4.6": { - "attachment": false, - "cost": { - "input": 0.6, - "output": 2.2 - }, - "id": "zai-org/GLM-4.6", - "knowledge": "2025-08", - "last_updated": "2025-16-09", - "limit": { - "context": 200000, - "output": 200000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.6", - "open_weights": true, - "reasoning": false, - "release_date": "2025-16-09", - "temperature": true, - "tool_call": true - } - }, - "name": "Baseten", - "npm": "@ai-sdk/openai-compatible" - }, - "cerebras": { - "doc": "https://inference-docs.cerebras.ai/models/overview", - "env": [ - "CEREBRAS_API_KEY" - ], - "id": "cerebras", - "models": { - "gpt-oss-120b": { - "attachment": false, - "cost": { - "input": 0.25, - "output": 0.69 - }, - "id": "gpt-oss-120b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 120B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "qwen-3-235b-a22b-instruct-2507": { - "attachment": false, - "cost": { - "input": 0.6, - "output": 1.2 - }, - "id": "qwen-3-235b-a22b-instruct-2507", - "knowledge": "2025-04", - "last_updated": "2025-07-22", - "limit": { - "context": 131000, - "output": 32000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen 3 235B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-22", - "temperature": true, - "tool_call": true - }, - "qwen-3-coder-480b": { - "attachment": false, - "cost": { - "input": 2, - "output": 2 - }, - "id": "qwen-3-coder-480b", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 131000, - "output": 32000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen 3 Coder 480B", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "zai-glm-4.6": { - "attachment": false, - "cost": { - "cache_read": 0, - "cache_write": 0, - "input": 0, - "output": 0 - }, - "id": "zai-glm-4.6", - "last_updated": "2025-11-05", - "limit": { - "context": 131072, - "output": 40960 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Z.AI GLM-4.6", - "open_weights": true, - "reasoning": false, - "release_date": "2025-11-05", - "temperature": true, - "tool_call": true - } - }, - "name": "Cerebras", - "npm": "@ai-sdk/cerebras" - }, - "cloudflare-workers-ai": { - "doc": "https://developers.cloudflare.com/workers-ai/models/", - "env": [ - "CLOUDFLARE_ACCOUNT_ID", - "CLOUDFLARE_API_KEY" - ], - "id": "cloudflare-workers-ai", - "models": { - "aura-1": { - "attachment": false, - "cost": { - "input": 0.015, - "output": 0.015 - }, - "id": "aura-1", - "last_updated": "2025-07-07", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "audio" - ] - }, - "name": "@cf/deepgram/aura-1", - "open_weights": true, - "reasoning": false, - "release_date": "2025-08-27", - "temperature": false, - "tool_call": false - }, - "bart-large-cnn": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "bart-large-cnn", - "last_updated": "2024-02-13", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/facebook/bart-large-cnn", - "open_weights": true, - "reasoning": false, - "release_date": "2022-03-02", - "temperature": false, - "tool_call": false - }, - "deepseek-coder-6.7b-base-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek-coder-6.7b-base-awq", - "last_updated": "2023-11-09", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/thebloke/deepseek-coder-6.7b-base-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2023-11-05", - "temperature": true, - "tool_call": true - }, - "deepseek-coder-6.7b-instruct-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek-coder-6.7b-instruct-awq", - "last_updated": "2023-11-13", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/thebloke/deepseek-coder-6.7b-instruct-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2023-11-05", - "temperature": true, - "tool_call": true - }, - "deepseek-math-7b-instruct": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek-math-7b-instruct", - "last_updated": "2024-02-06", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/deepseek-ai/deepseek-math-7b-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-02-05", - "temperature": true, - "tool_call": true - }, - "deepseek-r1-distill-qwen-32b": { - "attachment": false, - "cost": { - "input": 0.5, - "output": 4.88 - }, - "id": "deepseek-r1-distill-qwen-32b", - "last_updated": "2025-02-24", - "limit": { - "context": 80000, - "output": 80000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b", - "open_weights": true, - "reasoning": true, - "release_date": "2025-01-20", - "temperature": true, - "tool_call": true - }, - "discolm-german-7b-v1-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "discolm-german-7b-v1-awq", - "last_updated": "2024-01-24", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/thebloke/discolm-german-7b-v1-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2024-01-18", - "temperature": true, - "tool_call": true - }, - "dreamshaper-8-lcm": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "dreamshaper-8-lcm", - "last_updated": "2023-12-07", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "image" - ] - }, - "name": "@cf/lykon/dreamshaper-8-lcm", - "open_weights": true, - "reasoning": false, - "release_date": "2023-12-06", - "temperature": false, - "tool_call": false - }, - "falcon-7b-instruct": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "falcon-7b-instruct", - "last_updated": "2024-10-12", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/tiiuae/falcon-7b-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2023-04-25", - "temperature": true, - "tool_call": true - }, - "flux-1-schnell": { - "attachment": false, - "cost": { - "input": 5.3e-05, - "output": 0.00011 - }, - "id": "flux-1-schnell", - "last_updated": "2024-08-16", - "limit": { - "context": 2048, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "image" - ] - }, - "name": "@cf/black-forest-labs/flux-1-schnell", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-31", - "temperature": false, - "tool_call": false - }, - "gemma-2b-it-lora": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "gemma-2b-it-lora", - "last_updated": "2024-04-02", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/google/gemma-2b-it-lora", - "open_weights": true, - "reasoning": false, - "release_date": "2024-04-02", - "temperature": true, - "tool_call": true - }, - "gemma-3-12b-it": { - "attachment": false, - "cost": { - "input": 0.35, - "output": 0.56 - }, - "id": "gemma-3-12b-it", - "last_updated": "2025-03-21", - "limit": { - "context": 80000, - "output": 80000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/google/gemma-3-12b-it", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-01", - "temperature": true, - "tool_call": true - }, - "gemma-7b-it": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "gemma-7b-it", - "last_updated": "2024-08-14", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/google/gemma-7b-it", - "open_weights": true, - "reasoning": false, - "release_date": "2024-02-13", - "temperature": true, - "tool_call": true - }, - "gemma-7b-it-lora": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "gemma-7b-it-lora", - "last_updated": "2024-04-02", - "limit": { - "context": 3500, - "output": 3500 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/google/gemma-7b-it-lora", - "open_weights": true, - "reasoning": false, - "release_date": "2024-04-02", - "temperature": true, - "tool_call": true - }, - "gpt-oss-120b": { - "attachment": false, - "cost": { - "input": 0.35, - "output": 0.75 - }, - "id": "gpt-oss-120b", - "last_updated": "2025-08-14", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/openai/gpt-oss-120b", - "open_weights": true, - "reasoning": false, - "release_date": "2025-08-04", - "temperature": false, - "tool_call": false - }, - "gpt-oss-20b": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.3 - }, - "id": "gpt-oss-20b", - "last_updated": "2025-08-14", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/openai/gpt-oss-20b", - "open_weights": true, - "reasoning": false, - "release_date": "2025-08-04", - "temperature": false, - "tool_call": false - }, - "hermes-2-pro-mistral-7b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "hermes-2-pro-mistral-7b", - "last_updated": "2024-09-08", - "limit": { - "context": 24000, - "output": 24000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/nousresearch/hermes-2-pro-mistral-7b", - "open_weights": true, - "reasoning": false, - "release_date": "2024-03-11", - "temperature": true, - "tool_call": true - }, - "llama-2-13b-chat-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "llama-2-13b-chat-awq", - "last_updated": "2023-11-09", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/thebloke/llama-2-13b-chat-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2023-09-19", - "temperature": true, - "tool_call": true - }, - "llama-2-7b-chat-fp16": { - "attachment": false, - "cost": { - "input": 0.56, - "output": 6.67 - }, - "id": "llama-2-7b-chat-fp16", - "last_updated": "2023-07-26", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-2-7b-chat-fp16", - "open_weights": true, - "reasoning": false, - "release_date": "2023-07-26", - "temperature": true, - "tool_call": true - }, - "llama-2-7b-chat-hf-lora": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "llama-2-7b-chat-hf-lora", - "last_updated": "2024-04-17", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta-llama/llama-2-7b-chat-hf-lora", - "open_weights": true, - "reasoning": false, - "release_date": "2023-07-13", - "temperature": true, - "tool_call": true - }, - "llama-2-7b-chat-int8": { - "attachment": false, - "cost": { - "input": 0.556, - "output": 6.667 - }, - "id": "llama-2-7b-chat-int8", - "last_updated": "2023-09-25", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-2-7b-chat-int8", - "open_weights": true, - "reasoning": false, - "release_date": "2023-09-25", - "temperature": true, - "tool_call": true - }, - "llama-3-8b-instruct": { - "attachment": false, - "cost": { - "input": 0.28, - "output": 0.83 - }, - "id": "llama-3-8b-instruct", - "last_updated": "2025-06-19", - "limit": { - "context": 7968, - "output": 7968 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3-8b-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-04-17", - "temperature": true, - "tool_call": true - }, - "llama-3-8b-instruct-awq": { - "attachment": false, - "cost": { - "input": 0.12, - "output": 0.27 - }, - "id": "llama-3-8b-instruct-awq", - "last_updated": "2024-05-09", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3-8b-instruct-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2024-05-09", - "temperature": true, - "tool_call": true - }, - "llama-3.1-70b-instruct": { - "attachment": false, - "cost": { - "input": 0.293, - "output": 2.253 - }, - "id": "llama-3.1-70b-instruct", - "last_updated": "2024-12-15", - "limit": { - "context": 24000, - "output": 24000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3.1-70b-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-16", - "temperature": true, - "tool_call": true - }, - "llama-3.1-8b-instruct": { - "attachment": false, - "cost": { - "input": 0.28, - "output": 0.83 - }, - "id": "llama-3.1-8b-instruct", - "last_updated": "2024-09-25", - "limit": { - "context": 7968, - "output": 7968 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3.1-8b-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-18", - "temperature": true, - "tool_call": true - }, - "llama-3.1-8b-instruct-awq": { - "attachment": false, - "cost": { - "input": 0.12, - "output": 0.27 - }, - "id": "llama-3.1-8b-instruct-awq", - "last_updated": "2024-07-25", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3.1-8b-instruct-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-25", - "temperature": true, - "tool_call": true - }, - "llama-3.1-8b-instruct-fast": { - "attachment": false, - "cost": { - "input": 0.045, - "output": 0.384 - }, - "id": "llama-3.1-8b-instruct-fast", - "last_updated": "2024-09-25", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3.1-8b-instruct-fast", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-18", - "temperature": true, - "tool_call": true - }, - "llama-3.1-8b-instruct-fp8": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0.29 - }, - "id": "llama-3.1-8b-instruct-fp8", - "last_updated": "2024-07-25", - "limit": { - "context": 32000, - "output": 32000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3.1-8b-instruct-fp8", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-25", - "temperature": true, - "tool_call": true - }, - "llama-3.2-11b-vision-instruct": { - "attachment": false, - "cost": { - "input": 0.049, - "output": 0.68 - }, - "id": "llama-3.2-11b-vision-instruct", - "last_updated": "2024-12-04", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3.2-11b-vision-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-09-18", - "temperature": true, - "tool_call": true - }, - "llama-3.2-1b-instruct": { - "attachment": false, - "cost": { - "input": 0.027, - "output": 0.2 - }, - "id": "llama-3.2-1b-instruct", - "last_updated": "2024-10-24", - "limit": { - "context": 60000, - "output": 60000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3.2-1b-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-09-18", - "temperature": true, - "tool_call": true - }, - "llama-3.2-3b-instruct": { - "attachment": false, - "cost": { - "input": 0.051, - "output": 0.34 - }, - "id": "llama-3.2-3b-instruct", - "last_updated": "2024-10-24", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3.2-3b-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-09-18", - "temperature": true, - "tool_call": true - }, - "llama-3.3-70b-instruct-fp8-fast": { - "attachment": false, - "cost": { - "input": 0.29, - "output": 2.25 - }, - "id": "llama-3.3-70b-instruct-fp8-fast", - "last_updated": "2024-12-06", - "limit": { - "context": 24000, - "output": 24000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-3.3-70b-instruct-fp8-fast", - "open_weights": true, - "reasoning": false, - "release_date": "2024-12-06", - "temperature": true, - "tool_call": true - }, - "llama-4-scout-17b-16e-instruct": { - "attachment": false, - "cost": { - "input": 0.27, - "output": 0.85 - }, - "id": "llama-4-scout-17b-16e-instruct", - "last_updated": "2025-05-23", - "limit": { - "context": 131000, - "output": 131000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-4-scout-17b-16e-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-04-02", - "temperature": true, - "tool_call": true - }, - "llama-guard-3-8b": { - "attachment": false, - "cost": { - "input": 0.48, - "output": 0.03 - }, - "id": "llama-guard-3-8b", - "last_updated": "2024-10-11", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/llama-guard-3-8b", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-22", - "temperature": true, - "tool_call": false - }, - "llamaguard-7b-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "llamaguard-7b-awq", - "last_updated": "2023-12-11", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/thebloke/llamaguard-7b-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2023-12-11", - "temperature": true, - "tool_call": true - }, - "llava-1.5-7b-hf": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "llava-1.5-7b-hf", - "last_updated": "2025-06-06", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "image", - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/llava-hf/llava-1.5-7b-hf", - "open_weights": true, - "reasoning": false, - "release_date": "2023-12-05", - "temperature": true, - "tool_call": false - }, - "lucid-origin": { - "attachment": false, - "cost": { - "input": 0.007, - "output": 0.007 - }, - "id": "lucid-origin", - "last_updated": "2025-08-05", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "image" - ] - }, - "name": "@cf/leonardo/lucid-origin", - "open_weights": false, - "reasoning": false, - "release_date": "2025-08-25", - "temperature": false, - "tool_call": false - }, - "m2m100-1.2b": { - "attachment": false, - "cost": { - "input": 0.34, - "output": 0.34 - }, - "id": "m2m100-1.2b", - "last_updated": "2023-11-16", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/meta/m2m100-1.2b", - "open_weights": true, - "reasoning": false, - "release_date": "2022-03-02", - "temperature": false, - "tool_call": false - }, - "melotts": { - "attachment": true, - "cost": { - "input": 0.0002, - "output": 0 - }, - "id": "melotts", - "last_updated": "2024-07-19", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "audio" - ] - }, - "name": "@cf/myshell-ai/melotts", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-19", - "temperature": false, - "tool_call": false - }, - "mistral-7b-instruct-v0.1": { - "attachment": false, - "cost": { - "input": 0.11, - "output": 0.19 - }, - "id": "mistral-7b-instruct-v0.1", - "last_updated": "2025-07-24", - "limit": { - "context": 2824, - "output": 2824 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/mistral/mistral-7b-instruct-v0.1", - "open_weights": true, - "reasoning": false, - "release_date": "2023-09-27", - "temperature": true, - "tool_call": true - }, - "mistral-7b-instruct-v0.1-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "mistral-7b-instruct-v0.1-awq", - "last_updated": "2023-11-09", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/thebloke/mistral-7b-instruct-v0.1-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2023-09-27", - "temperature": true, - "tool_call": true - }, - "mistral-7b-instruct-v0.2": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "mistral-7b-instruct-v0.2", - "last_updated": "2025-07-24", - "limit": { - "context": 3072, - "output": 3072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/mistral/mistral-7b-instruct-v0.2", - "open_weights": true, - "reasoning": false, - "release_date": "2023-12-11", - "temperature": true, - "tool_call": true - }, - "mistral-7b-instruct-v0.2-lora": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "mistral-7b-instruct-v0.2-lora", - "last_updated": "2024-04-01", - "limit": { - "context": 15000, - "output": 15000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/mistral/mistral-7b-instruct-v0.2-lora", - "open_weights": true, - "reasoning": false, - "release_date": "2024-04-01", - "temperature": true, - "tool_call": true - }, - "mistral-small-3.1-24b-instruct": { - "attachment": false, - "cost": { - "input": 0.35, - "output": 0.56 - }, - "id": "mistral-small-3.1-24b-instruct", - "last_updated": "2025-07-28", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/mistralai/mistral-small-3.1-24b-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-11", - "temperature": true, - "tool_call": true - }, - "neural-chat-7b-v3-1-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "neural-chat-7b-v3-1-awq", - "last_updated": "2023-11-17", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/thebloke/neural-chat-7b-v3-1-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2023-11-15", - "temperature": true, - "tool_call": true - }, - "nova-3": { - "attachment": false, - "cost": { - "input": 0.0052, - "output": 0.0052 - }, - "id": "nova-3", - "last_updated": "2025-07-08", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "audio" - ], - "output": [ - "text" - ] - }, - "name": "@cf/deepgram/nova-3", - "open_weights": true, - "reasoning": false, - "release_date": "2025-06-05", - "temperature": false, - "tool_call": false - }, - "openchat-3.5-0106": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openchat-3.5-0106", - "last_updated": "2024-05-18", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/openchat/openchat-3.5-0106", - "open_weights": true, - "reasoning": false, - "release_date": "2024-01-07", - "temperature": true, - "tool_call": true - }, - "openhermes-2.5-mistral-7b-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openhermes-2.5-mistral-7b-awq", - "last_updated": "2023-11-09", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/thebloke/openhermes-2.5-mistral-7b-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2023-11-02", - "temperature": true, - "tool_call": true - }, - "phi-2": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "phi-2", - "last_updated": "2024-04-29", - "limit": { - "context": 2048, - "output": 2048 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/microsoft/phi-2", - "open_weights": true, - "reasoning": false, - "release_date": "2023-12-13", - "temperature": true, - "tool_call": true - }, - "phoenix-1.0": { - "attachment": false, - "cost": { - "input": 0.0058, - "output": 0.0058 - }, - "id": "phoenix-1.0", - "last_updated": "2025-08-25", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "image" - ] - }, - "name": "@cf/leonardo/phoenix-1.0", - "open_weights": false, - "reasoning": false, - "release_date": "2025-08-25", - "temperature": false, - "tool_call": false - }, - "qwen1.5-0.5b-chat": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen1.5-0.5b-chat", - "last_updated": "2024-04-30", - "limit": { - "context": 32000, - "output": 32000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/qwen/qwen1.5-0.5b-chat", - "open_weights": true, - "reasoning": false, - "release_date": "2024-01-31", - "temperature": true, - "tool_call": true - }, - "qwen1.5-1.8b-chat": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen1.5-1.8b-chat", - "last_updated": "2024-04-30", - "limit": { - "context": 32000, - "output": 32000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/qwen/qwen1.5-1.8b-chat", - "open_weights": true, - "reasoning": false, - "release_date": "2024-01-30", - "temperature": true, - "tool_call": true - }, - "qwen1.5-14b-chat-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen1.5-14b-chat-awq", - "last_updated": "2024-04-30", - "limit": { - "context": 7500, - "output": 7500 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/qwen/qwen1.5-14b-chat-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2024-02-03", - "temperature": true, - "tool_call": true - }, - "qwen1.5-7b-chat-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen1.5-7b-chat-awq", - "last_updated": "2024-04-30", - "limit": { - "context": 20000, - "output": 20000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/qwen/qwen1.5-7b-chat-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2024-02-03", - "temperature": true, - "tool_call": true - }, - "qwen2.5-coder-32b-instruct": { - "attachment": false, - "cost": { - "input": 0.66, - "output": 1 - }, - "id": "qwen2.5-coder-32b-instruct", - "last_updated": "2025-01-12", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/qwen/qwen2.5-coder-32b-instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-11-06", - "temperature": true, - "tool_call": true - }, - "qwq-32b": { - "attachment": false, - "cost": { - "input": 0.66, - "output": 1 - }, - "id": "qwq-32b", - "last_updated": "2025-03-11", - "limit": { - "context": 24000, - "output": 24000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/qwen/qwq-32b", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-05", - "temperature": true, - "tool_call": true - }, - "resnet-50": { - "attachment": false, - "cost": { - "input": 2.5e-06, - "output": 0 - }, - "id": "resnet-50", - "last_updated": "2024-02-13", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "image" - ], - "output": [ - "text" - ] - }, - "name": "@cf/microsoft/resnet-50", - "open_weights": true, - "reasoning": false, - "release_date": "2022-03-16", - "temperature": false, - "tool_call": false - }, - "sqlcoder-7b-2": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "sqlcoder-7b-2", - "last_updated": "2024-02-12", - "limit": { - "context": 10000, - "output": 10000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/defog/sqlcoder-7b-2", - "open_weights": true, - "reasoning": false, - "release_date": "2024-02-05", - "temperature": true, - "tool_call": true - }, - "stable-diffusion-v1-5-img2img": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "stable-diffusion-v1-5-img2img", - "last_updated": "2024-02-27", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "image" - ] - }, - "name": "@cf/runwayml/stable-diffusion-v1-5-img2img", - "open_weights": true, - "reasoning": false, - "release_date": "2024-02-27", - "temperature": false, - "tool_call": false - }, - "stable-diffusion-v1-5-inpainting": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "stable-diffusion-v1-5-inpainting", - "last_updated": "2024-02-27", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "image" - ] - }, - "name": "@cf/runwayml/stable-diffusion-v1-5-inpainting", - "open_weights": true, - "reasoning": false, - "release_date": "2024-02-27", - "temperature": false, - "tool_call": false - }, - "stable-diffusion-xl-base-1.0": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "stable-diffusion-xl-base-1.0", - "last_updated": "2023-10-30", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "image" - ] - }, - "name": "@cf/stabilityai/stable-diffusion-xl-base-1.0", - "open_weights": true, - "reasoning": false, - "release_date": "2023-07-25", - "temperature": false, - "tool_call": false - }, - "stable-diffusion-xl-lightning": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "stable-diffusion-xl-lightning", - "last_updated": "2024-04-03", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "image" - ] - }, - "name": "@cf/bytedance/stable-diffusion-xl-lightning", - "open_weights": true, - "reasoning": false, - "release_date": "2024-02-20", - "temperature": false, - "tool_call": false - }, - "starling-lm-7b-beta": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "starling-lm-7b-beta", - "last_updated": "2024-04-03", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/nexusflow/starling-lm-7b-beta", - "open_weights": true, - "reasoning": false, - "release_date": "2024-03-19", - "temperature": true, - "tool_call": true - }, - "tinyllama-1.1b-chat-v1.0": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "tinyllama-1.1b-chat-v1.0", - "last_updated": "2024-03-17", - "limit": { - "context": 2048, - "output": 2048 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/tinyllama/tinyllama-1.1b-chat-v1.0", - "open_weights": true, - "reasoning": false, - "release_date": "2023-12-30", - "temperature": true, - "tool_call": true - }, - "uform-gen2-qwen-500m": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "uform-gen2-qwen-500m", - "last_updated": "2024-04-24", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "image", - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/unum/uform-gen2-qwen-500m", - "open_weights": true, - "reasoning": false, - "release_date": "2024-02-15", - "temperature": false, - "tool_call": false - }, - "una-cybertron-7b-v2-bf16": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "una-cybertron-7b-v2-bf16", - "last_updated": "2024-03-08", - "limit": { - "context": 15000, - "output": 15000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@cf/fblgit/una-cybertron-7b-v2-bf16", - "open_weights": true, - "reasoning": false, - "release_date": "2023-12-02", - "temperature": true, - "tool_call": true - }, - "whisper": { - "attachment": false, - "cost": { - "input": 0.00045, - "output": 0.00045 - }, - "id": "whisper", - "last_updated": "2024-08-12", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "audio" - ], - "output": [ - "text" - ] - }, - "name": "@cf/openai/whisper", - "open_weights": true, - "reasoning": false, - "release_date": "2023-11-07", - "temperature": false, - "tool_call": false - }, - "whisper-large-v3-turbo": { - "attachment": false, - "cost": { - "input": 0.00051, - "output": 0.00051 - }, - "id": "whisper-large-v3-turbo", - "last_updated": "2024-10-04", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "audio" - ], - "output": [ - "text" - ] - }, - "name": "@cf/openai/whisper-large-v3-turbo", - "open_weights": true, - "reasoning": false, - "release_date": "2024-10-01", - "temperature": false, - "tool_call": false - }, - "whisper-tiny-en": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "whisper-tiny-en", - "last_updated": "2024-01-22", - "limit": { - "context": 0, - "output": 0 - }, - "modalities": { - "input": [ - "audio" - ], - "output": [ - "text" - ] - }, - "name": "@cf/openai/whisper-tiny-en", - "open_weights": true, - "reasoning": false, - "release_date": "2022-09-26", - "temperature": false, - "tool_call": false - }, - "zephyr-7b-beta-awq": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "zephyr-7b-beta-awq", - "last_updated": "2023-11-09", - "limit": { - "context": 4096, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "@hf/thebloke/zephyr-7b-beta-awq", - "open_weights": true, - "reasoning": false, - "release_date": "2023-10-27", - "temperature": true, - "tool_call": true - } - }, - "name": "Cloudflare Workers AI", - "npm": "workers-ai-provider" - }, - "deepinfra": { - "doc": "https://deepinfra.com/models", - "env": [ - "DEEPINFRA_API_KEY" - ], - "id": "deepinfra", - "models": { - "Qwen/Qwen3-Coder-480B-A35B-Instruct": { - "attachment": false, - "cost": { - "input": 0.4, - "output": 1.6 - }, - "id": "Qwen/Qwen3-Coder-480B-A35B-Instruct", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 262144, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 480B A35B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo": { - "attachment": false, - "cost": { - "input": 0.3, - "output": 1.2 - }, - "id": "Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 262144, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 480B A35B Instruct Turbo", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "moonshotai/Kimi-K2-Instruct": { - "attachment": false, - "cost": { - "input": 0.5, - "output": 2 - }, - "id": "moonshotai/Kimi-K2-Instruct", - "knowledge": "2024-10", - "last_updated": "2025-07-11", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-11", - "temperature": true, - "tool_call": true - }, - "openai/gpt-oss-120b": { - "attachment": false, - "cost": { - "input": 0.05, - "output": 0.24 - }, - "id": "openai/gpt-oss-120b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 120B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "openai/gpt-oss-20b": { - "attachment": false, - "cost": { - "input": 0.03, - "output": 0.14 - }, - "id": "openai/gpt-oss-20b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 20B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "zai-org/GLM-4.5": { - "attachment": false, - "cost": { - "input": 0.6, - "output": 2.2 - }, - "id": "zai-org/GLM-4.5", - "knowledge": "2025-04", - "last_updated": "2025-07-28", - "limit": { - "context": 131072, - "output": 98304 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM-4.5", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-28", - "temperature": true, - "tool_call": true - } - }, - "name": "Deep Infra", - "npm": "@ai-sdk/deepinfra" - }, - "deepseek": { - "api": "https://api.deepseek.com", - "doc": "https://platform.deepseek.com/api-docs/pricing", - "env": [ - "DEEPSEEK_API_KEY" - ], - "id": "deepseek", - "models": { - "deepseek-chat": { - "attachment": true, - "cost": { - "cache_read": 0.07, - "input": 0.57, - "output": 1.68 - }, - "id": "deepseek-chat", - "knowledge": "2024-07", - "last_updated": "2025-08-21", - "limit": { - "context": 128000, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek Chat", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-26", - "temperature": true, - "tool_call": true - }, - "deepseek-reasoner": { - "attachment": true, - "cost": { - "cache_read": 0.07, - "input": 0.57, - "output": 1.68 - }, - "id": "deepseek-reasoner", - "knowledge": "2024-07", - "last_updated": "2025-08-21", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek Reasoner", - "open_weights": false, - "reasoning": true, - "release_date": "2025-01-20", - "temperature": true, - "tool_call": true - } - }, - "name": "DeepSeek", - "npm": "@ai-sdk/openai-compatible" - }, - "fireworks-ai": { - "api": "https://api.fireworks.ai/inference/v1/", - "doc": "https://fireworks.ai/docs/", - "env": [ - "FIREWORKS_API_KEY" - ], - "id": "fireworks-ai", - "models": { - "accounts/fireworks/models/deepseek-r1-0528": { - "attachment": false, - "cost": { - "input": 3, - "output": 8 - }, - "id": "accounts/fireworks/models/deepseek-r1-0528", - "knowledge": "2025-05", - "last_updated": "2025-05-28", - "limit": { - "context": 160000, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Deepseek R1 05/28", - "open_weights": true, - "reasoning": true, - "release_date": "2025-05-28", - "temperature": true, - "tool_call": true - }, - "accounts/fireworks/models/deepseek-v3-0324": { - "attachment": false, - "cost": { - "input": 0.9, - "output": 0.9 - }, - "id": "accounts/fireworks/models/deepseek-v3-0324", - "knowledge": "2024-10", - "last_updated": "2025-03-24", - "limit": { - "context": 160000, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Deepseek V3 03-24", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-24", - "temperature": true, - "tool_call": true - }, - "accounts/fireworks/models/deepseek-v3p1": { - "attachment": false, - "cost": { - "input": 0.56, - "output": 1.68 - }, - "id": "accounts/fireworks/models/deepseek-v3p1", - "knowledge": "2025-07", - "last_updated": "2025-08-21", - "limit": { - "context": 163840, - "output": 163840 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek V3.1", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-21", - "temperature": true, - "tool_call": true - }, - "accounts/fireworks/models/glm-4p5": { - "attachment": false, - "cost": { - "input": 0.55, - "output": 2.19 - }, - "id": "accounts/fireworks/models/glm-4p5", - "knowledge": "2025-04", - "last_updated": "2025-07-29", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.5", - "open_weights": true, - "reasoning": true, - "release_date": "2025-07-29", - "temperature": true, - "tool_call": true - }, - "accounts/fireworks/models/glm-4p5-air": { - "attachment": false, - "cost": { - "input": 0.22, - "output": 0.88 - }, - "id": "accounts/fireworks/models/glm-4p5-air", - "knowledge": "2025-04", - "last_updated": "2025-08-01", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.5 Air", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-01", - "temperature": true, - "tool_call": true - }, - "accounts/fireworks/models/gpt-oss-120b": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0.6 - }, - "id": "accounts/fireworks/models/gpt-oss-120b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 120B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "accounts/fireworks/models/gpt-oss-20b": { - "attachment": false, - "cost": { - "input": 0.05, - "output": 0.2 - }, - "id": "accounts/fireworks/models/gpt-oss-20b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 20B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "accounts/fireworks/models/kimi-k2-instruct": { - "attachment": false, - "cost": { - "input": 1, - "output": 3 - }, - "id": "accounts/fireworks/models/kimi-k2-instruct", - "knowledge": "2024-10", - "last_updated": "2025-07-11", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-11", - "temperature": true, - "tool_call": true - }, - "accounts/fireworks/models/minimax-m2": { - "attachment": false, - "cost": { - "input": 0.3, - "output": 1.2 - }, - "id": "accounts/fireworks/models/minimax-m2", - "knowledge": "2024-11", - "last_updated": "2025-10-27", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "MiniMax-M2", - "open_weights": true, - "reasoning": true, - "release_date": "2025-10-27", - "temperature": true, - "tool_call": true - }, - "accounts/fireworks/models/qwen3-235b-a22b": { - "attachment": false, - "cost": { - "input": 0.22, - "output": 0.88 - }, - "id": "accounts/fireworks/models/qwen3-235b-a22b", - "knowledge": "2025-04", - "last_updated": "2025-04-29", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 235B-A22B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-04-29", - "temperature": true, - "tool_call": true - }, - "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct": { - "attachment": false, - "cost": { - "input": 0.45, - "output": 1.8 - }, - "id": "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct", - "last_updated": "2025-07-22", - "limit": { - "context": 256000, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 480B A35B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-22", - "temperature": true, - "tool_call": true - } - }, - "name": "Fireworks AI", - "npm": "@ai-sdk/openai-compatible" - }, - "google": { - "doc": "https://ai.google.dev/gemini-api/docs/pricing", - "env": [ - "GOOGLE_GENERATIVE_AI_API_KEY", - "GEMINI_API_KEY" - ], - "id": "google", - "models": { - "gemini-1.5-flash": { - "attachment": true, - "cost": { - "cache_read": 0.01875, - "input": 0.075, - "output": 0.3 - }, - "id": "gemini-1.5-flash", - "knowledge": "2024-04", - "last_updated": "2024-05-14", - "limit": { - "context": 1000000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 1.5 Flash", - "open_weights": false, - "reasoning": false, - "release_date": "2024-05-14", - "temperature": true, - "tool_call": true - }, - "gemini-1.5-flash-8b": { - "attachment": true, - "cost": { - "cache_read": 0.01, - "input": 0.0375, - "output": 0.15 - }, - "id": "gemini-1.5-flash-8b", - "knowledge": "2024-04", - "last_updated": "2024-10-03", - "limit": { - "context": 1000000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 1.5 Flash-8B", - "open_weights": false, - "reasoning": false, - "release_date": "2024-10-03", - "temperature": true, - "tool_call": true - }, - "gemini-1.5-pro": { - "attachment": true, - "cost": { - "cache_read": 0.3125, - "input": 1.25, - "output": 5 - }, - "id": "gemini-1.5-pro", - "knowledge": "2024-04", - "last_updated": "2024-02-15", - "limit": { - "context": 1000000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 1.5 Pro", - "open_weights": false, - "reasoning": false, - "release_date": "2024-02-15", - "temperature": true, - "tool_call": true - }, - "gemini-2.0-flash": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "gemini-2.0-flash", - "knowledge": "2024-06", - "last_updated": "2024-12-11", - "limit": { - "context": 1048576, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.0 Flash", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-11", - "temperature": true, - "tool_call": true - }, - "gemini-2.0-flash-lite": { - "attachment": true, - "cost": { - "input": 0.075, - "output": 0.3 - }, - "id": "gemini-2.0-flash-lite", - "knowledge": "2024-06", - "last_updated": "2024-12-11", - "limit": { - "context": 1048576, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.0 Flash Lite", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-11", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash": { - "attachment": true, - "cost": { - "cache_read": 0.075, - "input": 0.3, - "input_audio": 1, - "output": 2.5 - }, - "id": "gemini-2.5-flash", - "knowledge": "2025-01", - "last_updated": "2025-06-05", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash", - "open_weights": false, - "reasoning": true, - "release_date": "2025-03-20", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-image": { - "attachment": true, - "cost": { - "cache_read": 0.075, - "input": 0.3, - "output": 30 - }, - "id": "gemini-2.5-flash-image", - "knowledge": "2025-06", - "last_updated": "2025-08-26", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text", - "image" - ] - }, - "name": "Gemini 2.5 Flash Image", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-26", - "temperature": true, - "tool_call": false - }, - "gemini-2.5-flash-image-preview": { - "attachment": true, - "cost": { - "cache_read": 0.075, - "input": 0.3, - "output": 30 - }, - "id": "gemini-2.5-flash-image-preview", - "knowledge": "2025-06", - "last_updated": "2025-08-26", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text", - "image" - ] - }, - "name": "Gemini 2.5 Flash Image (Preview)", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-26", - "temperature": true, - "tool_call": false - }, - "gemini-2.5-flash-lite": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "gemini-2.5-flash-lite", - "knowledge": "2025-01", - "last_updated": "2025-06-17", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Lite", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-17", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-lite-preview-06-17": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "input_audio": 0.3, - "output": 0.4 - }, - "id": "gemini-2.5-flash-lite-preview-06-17", - "knowledge": "2025-01", - "last_updated": "2025-06-17", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Lite Preview 06-17", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-17", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-lite-preview-09-2025": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "gemini-2.5-flash-lite-preview-09-2025", - "knowledge": "2025-01", - "last_updated": "2025-09-25", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Lite Preview 09-25", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-25", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-preview-04-17": { - "attachment": true, - "cost": { - "cache_read": 0.0375, - "input": 0.15, - "output": 0.6 - }, - "id": "gemini-2.5-flash-preview-04-17", - "knowledge": "2025-01", - "last_updated": "2025-04-17", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Preview 04-17", - "open_weights": false, - "reasoning": true, - "release_date": "2025-04-17", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-preview-05-20": { - "attachment": true, - "cost": { - "cache_read": 0.0375, - "input": 0.15, - "output": 0.6 - }, - "id": "gemini-2.5-flash-preview-05-20", - "knowledge": "2025-01", - "last_updated": "2025-05-20", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Preview 05-20", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-20", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-preview-09-2025": { - "attachment": true, - "cost": { - "cache_read": 0.075, - "input": 0.3, - "input_audio": 1, - "output": 2.5 - }, - "id": "gemini-2.5-flash-preview-09-2025", - "knowledge": "2025-01", - "last_updated": "2025-09-25", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Preview 09-25", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-25", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-preview-tts": { - "attachment": false, - "cost": { - "input": 0.5, - "output": 10 - }, - "id": "gemini-2.5-flash-preview-tts", - "knowledge": "2025-01", - "last_updated": "2025-05-01", - "limit": { - "context": 8000, - "output": 16000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "audio" - ] - }, - "name": "Gemini 2.5 Flash Preview TTS", - "open_weights": false, - "reasoning": false, - "release_date": "2025-05-01", - "temperature": false, - "tool_call": false - }, - "gemini-2.5-pro": { - "attachment": true, - "cost": { - "cache_read": 0.31, - "input": 1.25, - "output": 10 - }, - "id": "gemini-2.5-pro", - "knowledge": "2025-01", - "last_updated": "2025-06-05", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Pro", - "open_weights": false, - "reasoning": true, - "release_date": "2025-03-20", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-pro-preview-05-06": { - "attachment": true, - "cost": { - "cache_read": 0.31, - "input": 1.25, - "output": 10 - }, - "id": "gemini-2.5-pro-preview-05-06", - "knowledge": "2025-01", - "last_updated": "2025-05-06", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Pro Preview 05-06", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-06", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-pro-preview-06-05": { - "attachment": true, - "cost": { - "cache_read": 0.31, - "input": 1.25, - "output": 10 - }, - "id": "gemini-2.5-pro-preview-06-05", - "knowledge": "2025-01", - "last_updated": "2025-06-05", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Pro Preview 06-05", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-05", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-pro-preview-tts": { - "attachment": false, - "cost": { - "input": 1, - "output": 20 - }, - "id": "gemini-2.5-pro-preview-tts", - "knowledge": "2025-01", - "last_updated": "2025-05-01", - "limit": { - "context": 8000, - "output": 16000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "audio" - ] - }, - "name": "Gemini 2.5 Pro Preview TTS", - "open_weights": false, - "reasoning": false, - "release_date": "2025-05-01", - "temperature": false, - "tool_call": false - }, - "gemini-embedding-001": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0 - }, - "id": "gemini-embedding-001", - "knowledge": "2025-05", - "last_updated": "2025-05-20", - "limit": { - "context": 2048, - "output": 3072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Gemini Embedding 001", - "open_weights": false, - "reasoning": false, - "release_date": "2025-05-20", - "temperature": false, - "tool_call": false - }, - "gemini-flash-latest": { - "attachment": true, - "cost": { - "cache_read": 0.075, - "input": 0.3, - "input_audio": 1, - "output": 2.5 - }, - "id": "gemini-flash-latest", - "knowledge": "2025-01", - "last_updated": "2025-09-25", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini Flash Latest", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-25", - "temperature": true, - "tool_call": true - }, - "gemini-flash-lite-latest": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "gemini-flash-lite-latest", - "knowledge": "2025-01", - "last_updated": "2025-09-25", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini Flash-Lite Latest", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-25", - "temperature": true, - "tool_call": true - }, - "gemini-live-2.5-flash": { - "attachment": true, - "cost": { - "input": 0.5, - "input_audio": 3, - "output": 2, - "output_audio": 12 - }, - "id": "gemini-live-2.5-flash", - "knowledge": "2025-01", - "last_updated": "2025-09-01", - "limit": { - "context": 128000, - "output": 8000 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video" - ], - "output": [ - "text", - "audio" - ] - }, - "name": "Gemini Live 2.5 Flash", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-01", - "temperature": true, - "tool_call": true - }, - "gemini-live-2.5-flash-preview-native-audio": { - "attachment": false, - "cost": { - "input": 0.5, - "input_audio": 3, - "output": 2, - "output_audio": 12 - }, - "id": "gemini-live-2.5-flash-preview-native-audio", - "knowledge": "2025-01", - "last_updated": "2025-09-18", - "limit": { - "context": 131072, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "audio", - "video" - ], - "output": [ - "text", - "audio" - ] - }, - "name": "Gemini Live 2.5 Flash Preview Native Audio", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-17", - "temperature": false, - "tool_call": true - } - }, - "name": "Google", - "npm": "@ai-sdk/google" - }, - "google-vertex": { - "doc": "https://cloud.google.com/vertex-ai/generative-ai/docs/models", - "env": [ - "GOOGLE_VERTEX_PROJECT", - "GOOGLE_VERTEX_LOCATION", - "GOOGLE_APPLICATION_CREDENTIALS" - ], - "id": "google-vertex", - "models": { - "gemini-2.0-flash": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "gemini-2.0-flash", - "knowledge": "2024-06", - "last_updated": "2024-12-11", - "limit": { - "context": 1048576, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.0 Flash", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-11", - "temperature": true, - "tool_call": true - }, - "gemini-2.0-flash-lite": { - "attachment": true, - "cost": { - "input": 0.075, - "output": 0.3 - }, - "id": "gemini-2.0-flash-lite", - "knowledge": "2024-06", - "last_updated": "2024-12-11", - "limit": { - "context": 1048576, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.0 Flash Lite", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-11", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash": { - "attachment": true, - "cost": { - "cache_read": 0.075, - "cache_write": 0.383, - "input": 0.3, - "output": 2.5 - }, - "id": "gemini-2.5-flash", - "knowledge": "2025-01", - "last_updated": "2025-06-17", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-17", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-lite": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "gemini-2.5-flash-lite", - "knowledge": "2025-01", - "last_updated": "2025-06-17", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Lite", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-17", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-lite-preview-06-17": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "gemini-2.5-flash-lite-preview-06-17", - "knowledge": "2025-01", - "last_updated": "2025-06-17", - "limit": { - "context": 65536, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Lite Preview 06-17", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-17", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-lite-preview-09-2025": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "gemini-2.5-flash-lite-preview-09-2025", - "knowledge": "2025-01", - "last_updated": "2025-09-25", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Lite Preview 09-25", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-25", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-preview-04-17": { - "attachment": true, - "cost": { - "cache_read": 0.0375, - "input": 0.15, - "output": 0.6 - }, - "id": "gemini-2.5-flash-preview-04-17", - "knowledge": "2025-01", - "last_updated": "2025-04-17", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Preview 04-17", - "open_weights": false, - "reasoning": true, - "release_date": "2025-04-17", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-preview-05-20": { - "attachment": true, - "cost": { - "cache_read": 0.0375, - "input": 0.15, - "output": 0.6 - }, - "id": "gemini-2.5-flash-preview-05-20", - "knowledge": "2025-01", - "last_updated": "2025-05-20", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Preview 05-20", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-20", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-flash-preview-09-2025": { - "attachment": true, - "cost": { - "cache_read": 0.075, - "cache_write": 0.383, - "input": 0.3, - "output": 2.5 - }, - "id": "gemini-2.5-flash-preview-09-2025", - "knowledge": "2025-01", - "last_updated": "2025-09-25", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Preview 09-25", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-25", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-pro": { - "attachment": true, - "cost": { - "cache_read": 0.31, - "input": 1.25, - "output": 10 - }, - "id": "gemini-2.5-pro", - "knowledge": "2025-01", - "last_updated": "2025-06-05", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Pro", - "open_weights": false, - "reasoning": true, - "release_date": "2025-03-20", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-pro-preview-05-06": { - "attachment": true, - "cost": { - "cache_read": 0.31, - "input": 1.25, - "output": 10 - }, - "id": "gemini-2.5-pro-preview-05-06", - "knowledge": "2025-01", - "last_updated": "2025-05-06", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Pro Preview 05-06", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-06", - "temperature": true, - "tool_call": true - }, - "gemini-2.5-pro-preview-06-05": { - "attachment": true, - "cost": { - "cache_read": 0.31, - "input": 1.25, - "output": 10 - }, - "id": "gemini-2.5-pro-preview-06-05", - "knowledge": "2025-01", - "last_updated": "2025-06-05", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Pro Preview 06-05", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-05", - "temperature": true, - "tool_call": true - }, - "gemini-embedding-001": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0 - }, - "id": "gemini-embedding-001", - "knowledge": "2025-05", - "last_updated": "2025-05-20", - "limit": { - "context": 2048, - "output": 3072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Gemini Embedding 001", - "open_weights": false, - "reasoning": false, - "release_date": "2025-05-20", - "temperature": false, - "tool_call": false - }, - "gemini-flash-latest": { - "attachment": true, - "cost": { - "cache_read": 0.075, - "cache_write": 0.383, - "input": 0.3, - "output": 2.5 - }, - "id": "gemini-flash-latest", - "knowledge": "2025-01", - "last_updated": "2025-09-25", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini Flash Latest", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-25", - "temperature": true, - "tool_call": true - }, - "gemini-flash-lite-latest": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "gemini-flash-lite-latest", - "knowledge": "2025-01", - "last_updated": "2025-09-25", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini Flash-Lite Latest", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-25", - "temperature": true, - "tool_call": true - } - }, - "name": "Vertex", - "npm": "@ai-sdk/google-vertex" - }, - "google-vertex-anthropic": { - "doc": "https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/claude", - "env": [ - "GOOGLE_VERTEX_PROJECT", - "GOOGLE_VERTEX_LOCATION", - "GOOGLE_APPLICATION_CREDENTIALS" - ], - "id": "google-vertex-anthropic", - "models": { - "claude-3-5-haiku@20241022": { - "attachment": true, - "cost": { - "cache_read": 0.08, - "cache_write": 1, - "input": 0.8, - "output": 4 - }, - "id": "claude-3-5-haiku@20241022", - "knowledge": "2024-07-31", - "last_updated": "2024-10-22", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 3.5", - "open_weights": false, - "reasoning": false, - "release_date": "2024-10-22", - "temperature": true, - "tool_call": true - }, - "claude-3-5-sonnet@20241022": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-3-5-sonnet@20241022", - "knowledge": "2024-04-30", - "last_updated": "2024-10-22", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3.5 v2", - "open_weights": false, - "reasoning": false, - "release_date": "2024-10-22", - "temperature": true, - "tool_call": true - }, - "claude-3-7-sonnet@20250219": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-3-7-sonnet@20250219", - "knowledge": "2024-10-31", - "last_updated": "2025-02-19", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3.7", - "open_weights": false, - "reasoning": true, - "release_date": "2025-02-19", - "temperature": true, - "tool_call": true - }, - "claude-haiku-4-5@20251001": { - "attachment": true, - "cost": { - "cache_read": 0.1, - "cache_write": 1.25, - "input": 1, - "output": 5 - }, - "id": "claude-haiku-4-5@20251001", - "knowledge": "2025-02-31", - "last_updated": "2025-10-15", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 4.5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-10-15", - "temperature": true, - "tool_call": true - }, - "claude-opus-4-1@20250805": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "claude-opus-4-1@20250805", - "knowledge": "2025-03-31", - "last_updated": "2025-08-05", - "limit": { - "context": 200000, - "output": 32000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 4.1", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "claude-opus-4@20250514": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "claude-opus-4@20250514", - "knowledge": "2025-03-31", - "last_updated": "2025-05-22", - "limit": { - "context": 200000, - "output": 32000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 4", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-22", - "temperature": true, - "tool_call": true - }, - "claude-sonnet-4-5@20250929": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-sonnet-4-5@20250929", - "knowledge": "2025-07-31", - "last_updated": "2025-09-29", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 4.5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-29", - "temperature": true, - "tool_call": true - }, - "claude-sonnet-4@20250514": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "claude-sonnet-4@20250514", - "knowledge": "2025-03-31", - "last_updated": "2025-05-22", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 4", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-22", - "temperature": true, - "tool_call": true - } - }, - "name": "Vertex (Anthropic)", - "npm": "@ai-sdk/google-vertex" - }, - "groq": { - "doc": "https://console.groq.com/docs/models", - "env": [ - "GROQ_API_KEY" - ], - "id": "groq", - "models": { - "deepseek-r1-distill-llama-70b": { - "attachment": false, - "cost": { - "input": 0.75, - "output": 0.99 - }, - "id": "deepseek-r1-distill-llama-70b", - "knowledge": "2024-07", - "last_updated": "2025-01-20", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek R1 Distill Llama 70B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-01-20", - "temperature": true, - "tool_call": true - }, - "gemma2-9b-it": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.2 - }, - "id": "gemma2-9b-it", - "knowledge": "2024-06", - "last_updated": "2024-06-27", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Gemma 2 9B", - "open_weights": true, - "reasoning": false, - "release_date": "2024-06-27", - "temperature": true, - "tool_call": true - }, - "llama-3.1-8b-instant": { - "attachment": false, - "cost": { - "input": 0.05, - "output": 0.08 - }, - "id": "llama-3.1-8b-instant", - "knowledge": "2023-12", - "last_updated": "2024-07-23", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.1 8B Instant", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-23", - "temperature": true, - "tool_call": true - }, - "llama-3.3-70b-versatile": { - "attachment": false, - "cost": { - "input": 0.59, - "output": 0.79 - }, - "id": "llama-3.3-70b-versatile", - "knowledge": "2023-12", - "last_updated": "2024-12-06", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.3 70B Versatile", - "open_weights": true, - "reasoning": false, - "release_date": "2024-12-06", - "temperature": true, - "tool_call": true - }, - "llama-guard-3-8b": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.2 - }, - "id": "llama-guard-3-8b", - "last_updated": "2024-07-23", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama Guard 3 8B", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-23", - "temperature": true, - "tool_call": false - }, - "llama3-70b-8192": { - "attachment": false, - "cost": { - "input": 0.59, - "output": 0.79 - }, - "id": "llama3-70b-8192", - "knowledge": "2023-03", - "last_updated": "2024-04-18", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3 70B", - "open_weights": true, - "reasoning": false, - "release_date": "2024-04-18", - "temperature": true, - "tool_call": true - }, - "llama3-8b-8192": { - "attachment": false, - "cost": { - "input": 0.05, - "output": 0.08 - }, - "id": "llama3-8b-8192", - "knowledge": "2023-03", - "last_updated": "2024-04-18", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3 8B", - "open_weights": true, - "reasoning": false, - "release_date": "2024-04-18", - "temperature": true, - "tool_call": true - }, - "meta-llama/llama-4-maverick-17b-128e-instruct": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.6 - }, - "id": "meta-llama/llama-4-maverick-17b-128e-instruct", - "knowledge": "2024-08", - "last_updated": "2025-04-05", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Llama 4 Maverick 17B", - "open_weights": true, - "reasoning": false, - "release_date": "2025-04-05", - "temperature": true, - "tool_call": true - }, - "meta-llama/llama-4-scout-17b-16e-instruct": { - "attachment": false, - "cost": { - "input": 0.11, - "output": 0.34 - }, - "id": "meta-llama/llama-4-scout-17b-16e-instruct", - "knowledge": "2024-08", - "last_updated": "2025-04-05", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Llama 4 Scout 17B", - "open_weights": true, - "reasoning": false, - "release_date": "2025-04-05", - "temperature": true, - "tool_call": true - }, - "meta-llama/llama-guard-4-12b": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.2 - }, - "id": "meta-llama/llama-guard-4-12b", - "last_updated": "2025-04-05", - "limit": { - "context": 131072, - "output": 128 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Llama Guard 4 12B", - "open_weights": true, - "reasoning": false, - "release_date": "2025-04-05", - "temperature": true, - "tool_call": false - }, - "mistral-saba-24b": { - "attachment": false, - "cost": { - "input": 0.79, - "output": 0.79 - }, - "id": "mistral-saba-24b", - "knowledge": "2024-08", - "last_updated": "2025-02-06", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Saba 24B", - "open_weights": false, - "reasoning": false, - "release_date": "2025-02-06", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-k2-instruct": { - "attachment": false, - "cost": { - "input": 1, - "output": 3 - }, - "id": "moonshotai/kimi-k2-instruct", - "knowledge": "2024-10", - "last_updated": "2025-07-14", - "limit": { - "context": 131072, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-14", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-k2-instruct-0905": { - "attachment": false, - "cost": { - "input": 1, - "output": 3 - }, - "id": "moonshotai/kimi-k2-instruct-0905", - "knowledge": "2024-10", - "last_updated": "2025-09-05", - "limit": { - "context": 262144, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 Instruct 0905", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-05", - "temperature": true, - "tool_call": true - }, - "openai/gpt-oss-120b": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0.75 - }, - "id": "openai/gpt-oss-120b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 120B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "openai/gpt-oss-20b": { - "attachment": false, - "cost": { - "input": 0.1, - "output": 0.5 - }, - "id": "openai/gpt-oss-20b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 20B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "qwen-qwq-32b": { - "attachment": false, - "cost": { - "input": 0.29, - "output": 0.39 - }, - "id": "qwen-qwq-32b", - "knowledge": "2024-09", - "last_updated": "2024-11-27", - "limit": { - "context": 131072, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen QwQ 32B", - "open_weights": true, - "reasoning": true, - "release_date": "2024-11-27", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-32b": { - "attachment": false, - "cost": { - "input": 0.29, - "output": 0.59 - }, - "id": "qwen/qwen3-32b", - "knowledge": "2024-11-08", - "last_updated": "2024-12-23", - "limit": { - "context": 131072, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 32B", - "open_weights": true, - "reasoning": true, - "release_date": "2024-12-23", - "temperature": true, - "tool_call": true - } - }, - "name": "Groq", - "npm": "@ai-sdk/groq" - }, - "huggingface": { - "api": "https://router.huggingface.co/v1", - "doc": "https://huggingface.co/docs/inference-providers", - "env": [ - "HF_TOKEN" - ], - "id": "huggingface", - "models": { - "MiniMaxAI/MiniMax-M2": { - "attachment": false, - "cost": { - "input": 0.3, - "output": 1.2 - }, - "id": "MiniMaxAI/MiniMax-M2", - "knowledge": "2025-10", - "last_updated": "2025-10-27", - "limit": { - "context": 204800, - "output": 204800 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "MiniMax-M2", - "open_weights": true, - "reasoning": true, - "release_date": "2025-10-27", - "temperature": true, - "tool_call": true - }, - "Qwen/Qwen3-235B-A22B-Thinking-2507": { - "attachment": false, - "cost": { - "input": 0.3, - "output": 3 - }, - "id": "Qwen/Qwen3-235B-A22B-Thinking-2507", - "knowledge": "2025-04", - "last_updated": "2025-07-25", - "limit": { - "context": 262144, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3-235B-A22B-Thinking-2507", - "open_weights": true, - "reasoning": true, - "release_date": "2025-07-25", - "temperature": true, - "tool_call": true - }, - "Qwen/Qwen3-Coder-480B-A35B-Instruct": { - "attachment": false, - "cost": { - "input": 2, - "output": 2 - }, - "id": "Qwen/Qwen3-Coder-480B-A35B-Instruct", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 262144, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3-Coder-480B-A35B-Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "Qwen/Qwen3-Embedding-4B": { - "attachment": false, - "cost": { - "input": 0.01, - "output": 0 - }, - "id": "Qwen/Qwen3-Embedding-4B", - "knowledge": "2024-12", - "last_updated": "2025-01-01", - "limit": { - "context": 32000, - "output": 2048 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen 3 Embedding 4B", - "open_weights": true, - "reasoning": false, - "release_date": "2025-01-01", - "temperature": false, - "tool_call": false - }, - "Qwen/Qwen3-Embedding-8B": { - "attachment": false, - "cost": { - "input": 0.01, - "output": 0 - }, - "id": "Qwen/Qwen3-Embedding-8B", - "knowledge": "2024-12", - "last_updated": "2025-01-01", - "limit": { - "context": 32000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen 3 Embedding 4B", - "open_weights": true, - "reasoning": false, - "release_date": "2025-01-01", - "temperature": false, - "tool_call": false - }, - "Qwen/Qwen3-Next-80B-A3B-Instruct": { - "attachment": false, - "cost": { - "input": 0.25, - "output": 1 - }, - "id": "Qwen/Qwen3-Next-80B-A3B-Instruct", - "knowledge": "2025-04", - "last_updated": "2025-09-11", - "limit": { - "context": 262144, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3-Next-80B-A3B-Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-11", - "temperature": true, - "tool_call": true - }, - "Qwen/Qwen3-Next-80B-A3B-Thinking": { - "attachment": false, - "cost": { - "input": 0.3, - "output": 2 - }, - "id": "Qwen/Qwen3-Next-80B-A3B-Thinking", - "knowledge": "2025-04", - "last_updated": "2025-09-11", - "limit": { - "context": 262144, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3-Next-80B-A3B-Thinking", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-11", - "temperature": true, - "tool_call": true - }, - "deepseek-ai/DeepSeek-R1-0528": { - "attachment": false, - "cost": { - "input": 3, - "output": 5 - }, - "id": "deepseek-ai/DeepSeek-R1-0528", - "knowledge": "2025-05", - "last_updated": "2025-05-28", - "limit": { - "context": 163840, - "output": 163840 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek-R1-0528", - "open_weights": true, - "reasoning": true, - "release_date": "2025-05-28", - "temperature": true, - "tool_call": true - }, - "deepseek-ai/Deepseek-V3-0324": { - "attachment": false, - "cost": { - "input": 1.25, - "output": 1.25 - }, - "id": "deepseek-ai/Deepseek-V3-0324", - "knowledge": "2024-10", - "last_updated": "2025-03-24", - "limit": { - "context": 16384, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek-V3-0324", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-24", - "temperature": true, - "tool_call": true - }, - "moonshotai/Kimi-K2-Instruct": { - "attachment": false, - "cost": { - "input": 1, - "output": 3 - }, - "id": "moonshotai/Kimi-K2-Instruct", - "knowledge": "2024-10", - "last_updated": "2025-07-14", - "limit": { - "context": 131072, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi-K2-Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-14", - "temperature": true, - "tool_call": true - }, - "moonshotai/Kimi-K2-Instruct-0905": { - "attachment": false, - "cost": { - "input": 1, - "output": 3 - }, - "id": "moonshotai/Kimi-K2-Instruct-0905", - "knowledge": "2024-10", - "last_updated": "2025-09-04", - "limit": { - "context": 262144, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi-K2-Instruct-0905", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-04", - "temperature": true, - "tool_call": true - }, - "zai-org/GLM-4.5": { - "attachment": false, - "cost": { - "input": 0.6, - "output": 2.2 - }, - "id": "zai-org/GLM-4.5", - "knowledge": "2025-04", - "last_updated": "2025-07-28", - "limit": { - "context": 131072, - "output": 98304 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM-4.5", - "open_weights": true, - "reasoning": true, - "release_date": "2025-07-28", - "temperature": true, - "tool_call": true - }, - "zai-org/GLM-4.5-Air": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 1.1 - }, - "id": "zai-org/GLM-4.5-Air", - "knowledge": "2025-04", - "last_updated": "2025-07-28", - "limit": { - "context": 128000, - "output": 96000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM-4.5-Air", - "open_weights": true, - "reasoning": true, - "release_date": "2025-07-28", - "temperature": true, - "tool_call": true - }, - "zai-org/GLM-4.6": { - "attachment": false, - "cost": { - "cache_read": 0.11, - "input": 0.6, - "output": 2.2 - }, - "id": "zai-org/GLM-4.6", - "knowledge": "2025-04", - "last_updated": "2025-09-30", - "limit": { - "context": 200000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM-4.6", - "open_weights": true, - "reasoning": true, - "release_date": "2025-09-30", - "temperature": true, - "tool_call": true - } - }, - "name": "Hugging Face", - "npm": "@ai-sdk/openai-compatible" - }, - "lmstudio": { - "api": "http://127.0.0.1:1234/v1", - "doc": "https://lmstudio.ai/models", - "env": [ - "LMSTUDIO_API_KEY" - ], - "id": "lmstudio", - "models": { - "openai/gpt-oss-20b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openai/gpt-oss-20b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 20B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-30b-a3b-2507": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-30b-a3b-2507", - "knowledge": "2025-04", - "last_updated": "2025-07-30", - "limit": { - "context": 262144, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 30B A3B 2507", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-30", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-coder-30b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-coder-30b", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 262144, - "output": 65536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 30B", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - } - }, - "name": "LMStudio", - "npm": "@ai-sdk/openai-compatible" - }, - "mistral": { - "doc": "https://docs.mistral.ai/getting-started/models/", - "env": [ - "MISTRAL_API_KEY" - ], - "id": "mistral", - "models": { - "codestral-latest": { - "attachment": false, - "cost": { - "input": 0.3, - "output": 0.9 - }, - "id": "codestral-latest", - "knowledge": "2024-10", - "last_updated": "2025-01-04", - "limit": { - "context": 256000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Codestral", - "open_weights": true, - "reasoning": false, - "release_date": "2024-05-29", - "temperature": true, - "tool_call": true - }, - "devstral-medium-2507": { - "attachment": false, - "cost": { - "input": 0.4, - "output": 2 - }, - "id": "devstral-medium-2507", - "knowledge": "2025-05", - "last_updated": "2025-07-10", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Devstral Medium", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-10", - "temperature": true, - "tool_call": true - }, - "devstral-small-2505": { - "attachment": false, - "cost": { - "input": 0.1, - "output": 0.3 - }, - "id": "devstral-small-2505", - "knowledge": "2025-05", - "last_updated": "2025-05-07", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Devstral Small 2505", - "open_weights": true, - "reasoning": false, - "release_date": "2025-05-07", - "temperature": true, - "tool_call": true - }, - "devstral-small-2507": { - "attachment": false, - "cost": { - "input": 0.1, - "output": 0.3 - }, - "id": "devstral-small-2507", - "knowledge": "2025-05", - "last_updated": "2025-07-10", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Devstral Small", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-10", - "temperature": true, - "tool_call": true - }, - "magistral-medium-latest": { - "attachment": false, - "cost": { - "input": 2, - "output": 5 - }, - "id": "magistral-medium-latest", - "knowledge": "2025-06", - "last_updated": "2025-03-20", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Magistral Medium", - "open_weights": true, - "reasoning": true, - "release_date": "2025-03-17", - "temperature": true, - "tool_call": true - }, - "magistral-small": { - "attachment": false, - "cost": { - "input": 0.5, - "output": 1.5 - }, - "id": "magistral-small", - "knowledge": "2025-06", - "last_updated": "2025-03-17", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Magistral Small", - "open_weights": true, - "reasoning": true, - "release_date": "2025-03-17", - "temperature": true, - "tool_call": true - }, - "ministral-3b-latest": { - "attachment": false, - "cost": { - "input": 0.04, - "output": 0.04 - }, - "id": "ministral-3b-latest", - "knowledge": "2024-10", - "last_updated": "2024-10-04", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Ministral 3B", - "open_weights": true, - "reasoning": false, - "release_date": "2024-10-01", - "temperature": true, - "tool_call": true - }, - "ministral-8b-latest": { - "attachment": false, - "cost": { - "input": 0.1, - "output": 0.1 - }, - "id": "ministral-8b-latest", - "knowledge": "2024-10", - "last_updated": "2024-10-04", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Ministral 8B", - "open_weights": true, - "reasoning": false, - "release_date": "2024-10-01", - "temperature": true, - "tool_call": true - }, - "mistral-large-latest": { - "attachment": false, - "cost": { - "input": 2, - "output": 6 - }, - "id": "mistral-large-latest", - "knowledge": "2024-11", - "last_updated": "2024-11-04", - "limit": { - "context": 131072, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Large", - "open_weights": true, - "reasoning": false, - "release_date": "2024-11-01", - "temperature": true, - "tool_call": true - }, - "mistral-medium-2505": { - "attachment": true, - "cost": { - "input": 0.4, - "output": 2 - }, - "id": "mistral-medium-2505", - "knowledge": "2025-05", - "last_updated": "2025-05-07", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Medium 3", - "open_weights": false, - "reasoning": false, - "release_date": "2025-05-07", - "temperature": true, - "tool_call": true - }, - "mistral-medium-2508": { - "attachment": true, - "cost": { - "input": 0.4, - "output": 2 - }, - "id": "mistral-medium-2508", - "knowledge": "2025-05", - "last_updated": "2025-08-12", - "limit": { - "context": 262144, - "output": 262144 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Medium 3.1", - "open_weights": false, - "reasoning": false, - "release_date": "2025-08-12", - "temperature": true, - "tool_call": true - }, - "mistral-medium-latest": { - "attachment": false, - "cost": { - "input": 0.4, - "output": 2 - }, - "id": "mistral-medium-latest", - "knowledge": "2025-05", - "last_updated": "2025-05-10", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Medium", - "open_weights": true, - "reasoning": false, - "release_date": "2025-05-07", - "temperature": true, - "tool_call": true - }, - "mistral-nemo": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0.15 - }, - "id": "mistral-nemo", - "knowledge": "2024-07", - "last_updated": "2024-07-01", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Nemo", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-01", - "temperature": true, - "tool_call": true - }, - "mistral-small-latest": { - "attachment": false, - "cost": { - "input": 0.1, - "output": 0.3 - }, - "id": "mistral-small-latest", - "knowledge": "2025-03", - "last_updated": "2024-09-04", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Small", - "open_weights": true, - "reasoning": false, - "release_date": "2024-09-01", - "temperature": true, - "tool_call": true - }, - "open-mistral-7b": { - "attachment": false, - "cost": { - "input": 0.25, - "output": 0.25 - }, - "id": "open-mistral-7b", - "knowledge": "2023-12", - "last_updated": "2023-09-27", - "limit": { - "context": 8000, - "output": 8000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Mistral 7B", - "open_weights": true, - "reasoning": false, - "release_date": "2023-09-27", - "temperature": true, - "tool_call": true - }, - "open-mixtral-8x22b": { - "attachment": false, - "cost": { - "input": 2, - "output": 6 - }, - "id": "open-mixtral-8x22b", - "knowledge": "2024-04", - "last_updated": "2024-04-17", - "limit": { - "context": 64000, - "output": 64000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Mixtral 8x22B", - "open_weights": true, - "reasoning": false, - "release_date": "2024-04-17", - "temperature": true, - "tool_call": true - }, - "open-mixtral-8x7b": { - "attachment": false, - "cost": { - "input": 0.7, - "output": 0.7 - }, - "id": "open-mixtral-8x7b", - "knowledge": "2024-01", - "last_updated": "2023-12-11", - "limit": { - "context": 32000, - "output": 32000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Mixtral 8x7B", - "open_weights": true, - "reasoning": false, - "release_date": "2023-12-11", - "temperature": true, - "tool_call": true - }, - "pixtral-12b": { - "attachment": true, - "cost": { - "input": 0.15, - "output": 0.15 - }, - "id": "pixtral-12b", - "knowledge": "2024-09", - "last_updated": "2024-09-01", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Pixtral 12B", - "open_weights": true, - "reasoning": false, - "release_date": "2024-09-01", - "temperature": true, - "tool_call": true - }, - "pixtral-large-latest": { - "attachment": true, - "cost": { - "input": 2, - "output": 6 - }, - "id": "pixtral-large-latest", - "knowledge": "2024-11", - "last_updated": "2024-11-04", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Pixtral Large", - "open_weights": true, - "reasoning": false, - "release_date": "2024-11-01", - "temperature": true, - "tool_call": true - } - }, - "name": "Mistral", - "npm": "@ai-sdk/mistral" - }, - "nebius": { - "api": "https://api.tokenfactory.nebius.com/v1", - "doc": "https://docs.tokenfactory.nebius.com/", - "env": [ - "NEBIUS_API_KEY" - ], - "id": "nebius", - "models": { - "NousResearch/hermes-4-405b": { - "attachment": false, - "cost": { - "input": 1, - "output": 3 - }, - "id": "NousResearch/hermes-4-405b", - "knowledge": "2024-07", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Hermes-4 405B", - "open_weights": false, - "reasoning": true, - "release_date": "2024-08-01", - "temperature": true, - "tool_call": true - }, - "NousResearch/hermes-4-70b": { - "attachment": false, - "cost": { - "input": 0.13, - "output": 0.4 - }, - "id": "NousResearch/hermes-4-70b", - "knowledge": "2024-07", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Hermes 4 70B", - "open_weights": false, - "reasoning": true, - "release_date": "2024-08-01", - "temperature": true, - "tool_call": true - }, - "deepseek-ai/deepseek-v3": { - "attachment": false, - "cost": { - "input": 0.5, - "output": 1.5 - }, - "id": "deepseek-ai/deepseek-v3", - "knowledge": "2024-04", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek V3", - "open_weights": false, - "reasoning": true, - "release_date": "2024-05-07", - "temperature": true, - "tool_call": true - }, - "meta-llama/llama-3.3-70b-instruct-base": { - "attachment": false, - "cost": { - "input": 0.13, - "output": 0.4 - }, - "id": "meta-llama/llama-3.3-70b-instruct-base", - "knowledge": "2024-08", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama-3.3-70B-Instruct (Base)", - "open_weights": false, - "reasoning": true, - "release_date": "2024-08-22", - "temperature": true, - "tool_call": true - }, - "meta-llama/llama-3.3-70b-instruct-fast": { - "attachment": false, - "cost": { - "input": 0.25, - "output": 0.75 - }, - "id": "meta-llama/llama-3.3-70b-instruct-fast", - "knowledge": "2024-08", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama-3.3-70B-Instruct (Fast)", - "open_weights": false, - "reasoning": true, - "release_date": "2024-08-22", - "temperature": true, - "tool_call": true - }, - "meta-llama/llama-3_1-405b-instruct": { - "attachment": false, - "cost": { - "input": 1, - "output": 3 - }, - "id": "meta-llama/llama-3_1-405b-instruct", - "knowledge": "2024-03", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.1 405B Instruct", - "open_weights": false, - "reasoning": true, - "release_date": "2024-07-23", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-k2-instruct": { - "attachment": false, - "cost": { - "input": 0.5, - "output": 2.4 - }, - "id": "moonshotai/kimi-k2-instruct", - "knowledge": "2024-01", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 Instruct", - "open_weights": false, - "reasoning": true, - "release_date": "2025-01-01", - "temperature": true, - "tool_call": true - }, - "nvidia/llama-3_1-nemotron-ultra-253b-v1": { - "attachment": false, - "cost": { - "input": 0.6, - "output": 1.8 - }, - "id": "nvidia/llama-3_1-nemotron-ultra-253b-v1", - "knowledge": "2024-07", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.1 Nemotron Ultra 253B v1", - "open_weights": false, - "reasoning": true, - "release_date": "2024-07-01", - "temperature": true, - "tool_call": true - }, - "openai/gpt-oss-120b": { - "attachment": true, - "cost": { - "input": 0.15, - "output": 0.6 - }, - "id": "openai/gpt-oss-120b", - "knowledge": "2024-01", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 120B", - "open_weights": false, - "reasoning": true, - "release_date": "2024-01-01", - "temperature": true, - "tool_call": true - }, - "openai/gpt-oss-20b": { - "attachment": true, - "cost": { - "input": 0.05, - "output": 0.2 - }, - "id": "openai/gpt-oss-20b", - "knowledge": "2024-01", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 20B", - "open_weights": false, - "reasoning": true, - "release_date": "2024-01-01", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-235b-a22b-instruct-2507": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.6 - }, - "id": "qwen/qwen3-235b-a22b-instruct-2507", - "knowledge": "2025-07", - "last_updated": "2025-10-04", - "limit": { - "context": 262144, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 235B A22B Instruct 2507", - "open_weights": false, - "reasoning": true, - "release_date": "2025-07-25", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-235b-a22b-thinking-2507": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.8 - }, - "id": "qwen/qwen3-235b-a22b-thinking-2507", - "knowledge": "2025-07", - "last_updated": "2025-10-04", - "limit": { - "context": 262144, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 235B A22B Thinking 2507", - "open_weights": false, - "reasoning": true, - "release_date": "2025-07-25", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-coder-480b-a35b-instruct": { - "attachment": false, - "cost": { - "input": 0.4, - "output": 1.8 - }, - "id": "qwen/qwen3-coder-480b-a35b-instruct", - "knowledge": "2025-04", - "last_updated": "2025-10-04", - "limit": { - "context": 262144, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 480B A35B Instruct", - "open_weights": false, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "zai-org/glm-4.5": { - "attachment": false, - "cost": { - "input": 0.6, - "output": 2.2 - }, - "id": "zai-org/glm-4.5", - "knowledge": "2024-05", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.5", - "open_weights": false, - "reasoning": true, - "release_date": "2024-06-01", - "temperature": true, - "tool_call": true - }, - "zai-org/glm-4.5-air": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 1.2 - }, - "id": "zai-org/glm-4.5-air", - "knowledge": "2024-05", - "last_updated": "2025-10-04", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.5 Air", - "open_weights": false, - "reasoning": true, - "release_date": "2024-06-01", - "temperature": true, - "tool_call": true - } - }, - "name": "Nebius Token Factory", - "npm": "@ai-sdk/openai-compatible" - }, - "nvidia": { - "api": "https://integrate.api.nvidia.com/v1", - "doc": "https://docs.api.nvidia.com/nim/", - "env": [ - "NVIDIA_API_KEY" - ], - "id": "nvidia", - "models": { - "black-forest-labs/flux.1-dev": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "black-forest-labs/flux.1-dev", - "knowledge": "2024-08", - "last_updated": "2025-09-05", - "limit": { - "context": 4096, - "output": 0 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "image" - ] - }, - "name": "FLUX.1-dev", - "open_weights": false, - "reasoning": false, - "release_date": "2024-08-01", - "temperature": true, - "tool_call": false - }, - "deepseek-ai/deepseek-v3.1": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek-ai/deepseek-v3.1", - "knowledge": "2024-07", - "last_updated": "2025-08-26", - "limit": { - "context": 128000, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek V3.1", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-20", - "temperature": true, - "tool_call": true - }, - "deepseek-ai/deepseek-v3.1-terminus": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek-ai/deepseek-v3.1-terminus", - "knowledge": "2025-01", - "last_updated": "2025-09-22", - "limit": { - "context": 128000, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek V3.1 Terminus", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-22", - "temperature": true, - "tool_call": true - }, - "google/gemma-3-27b-it": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "google/gemma-3-27b-it", - "knowledge": "2024-12", - "last_updated": "2025-09-05", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Gemma-3-27B-IT", - "open_weights": false, - "reasoning": true, - "release_date": "2024-12-01", - "temperature": true, - "tool_call": true - }, - "microsoft/phi-4-mini-instruct": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "microsoft/phi-4-mini-instruct", - "knowledge": "2024-12", - "last_updated": "2025-09-05", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio" - ], - "output": [ - "text" - ] - }, - "name": "Phi-4-Mini", - "open_weights": false, - "reasoning": true, - "release_date": "2024-12-01", - "temperature": true, - "tool_call": true - }, - "minimaxai/minimax-m2": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "minimaxai/minimax-m2", - "knowledge": "2024-07", - "last_updated": "2025-10-31", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "MiniMax-M2", - "open_weights": true, - "reasoning": true, - "release_date": "2025-10-27", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-k2-instruct": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "moonshotai/kimi-k2-instruct", - "knowledge": "2024-01", - "last_updated": "2025-09-05", - "limit": { - "context": 128000, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 Instruct", - "open_weights": false, - "reasoning": true, - "release_date": "2025-01-01", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-k2-instruct-0905": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "moonshotai/kimi-k2-instruct-0905", - "knowledge": "2024-10", - "last_updated": "2025-09-05", - "limit": { - "context": 262144, - "output": 262144 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 0905", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-05", - "temperature": true, - "tool_call": true - }, - "nvidia/cosmos-nemotron-34b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "nvidia/cosmos-nemotron-34b", - "knowledge": "2024-01", - "last_updated": "2025-09-05", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "video" - ], - "output": [ - "text" - ] - }, - "name": "Cosmos Nemotron 34B", - "open_weights": false, - "reasoning": true, - "release_date": "2024-01-01", - "temperature": true, - "tool_call": false - }, - "nvidia/llama-3.1-nemotron-ultra-253b-v1": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "nvidia/llama-3.1-nemotron-ultra-253b-v1", - "knowledge": "2024-07", - "last_updated": "2025-09-05", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama-3.1-Nemotron-Ultra-253B-v1", - "open_weights": false, - "reasoning": true, - "release_date": "2024-07-01", - "temperature": true, - "tool_call": true - }, - "nvidia/llama-embed-nemotron-8b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "nvidia/llama-embed-nemotron-8b", - "knowledge": "2025-03", - "last_updated": "2025-03-18", - "limit": { - "context": 32768, - "output": 2048 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama Embed Nemotron 8B", - "open_weights": false, - "reasoning": false, - "release_date": "2025-03-18", - "temperature": false, - "tool_call": false - }, - "nvidia/nemoretriever-ocr-v1": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "nvidia/nemoretriever-ocr-v1", - "knowledge": "2024-01", - "last_updated": "2025-09-05", - "limit": { - "context": 0, - "output": 4096 - }, - "modalities": { - "input": [ - "image" - ], - "output": [ - "text" - ] - }, - "name": "NeMo Retriever OCR v1", - "open_weights": false, - "reasoning": false, - "release_date": "2024-01-01", - "temperature": false, - "tool_call": false - }, - "nvidia/nvidia-nemotron-nano-9b-v2": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "nvidia/nvidia-nemotron-nano-9b-v2", - "knowledge": "2024-09", - "last_updated": "2025-08-18", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "nvidia-nemotron-nano-9b-v2", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-18", - "temperature": true, - "tool_call": true - }, - "nvidia/parakeet-tdt-0.6b-v2": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "nvidia/parakeet-tdt-0.6b-v2", - "knowledge": "2024-01", - "last_updated": "2025-09-05", - "limit": { - "context": 0, - "output": 4096 - }, - "modalities": { - "input": [ - "audio" - ], - "output": [ - "text" - ] - }, - "name": "Parakeet TDT 0.6B v2", - "open_weights": false, - "reasoning": false, - "release_date": "2024-01-01", - "temperature": false, - "tool_call": false - }, - "openai/gpt-oss-120b": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openai/gpt-oss-120b", - "knowledge": "2025-08", - "last_updated": "2025-08-14", - "limit": { - "context": 128000, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT-OSS-120B", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-04", - "temperature": true, - "tool_call": false - }, - "openai/whisper-large-v3": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openai/whisper-large-v3", - "knowledge": "2023-09", - "last_updated": "2025-09-05", - "limit": { - "context": 0, - "output": 4096 - }, - "modalities": { - "input": [ - "audio" - ], - "output": [ - "text" - ] - }, - "name": "Whisper Large v3", - "open_weights": true, - "reasoning": false, - "release_date": "2023-09-01", - "temperature": false, - "tool_call": false - }, - "qwen/qwen3-235b-a22b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-235b-a22b", - "knowledge": "2024-12", - "last_updated": "2025-09-05", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3-235B-A22B", - "open_weights": false, - "reasoning": true, - "release_date": "2024-12-01", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-coder-480b-a35b-instruct": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-coder-480b-a35b-instruct", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 262144, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 480B A35B Instruct", - "open_weights": false, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-next-80b-a3b-instruct": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-next-80b-a3b-instruct", - "knowledge": "2024-12", - "last_updated": "2025-09-05", - "limit": { - "context": 262144, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3-Next-80B-A3B-Instruct", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-01", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-next-80b-a3b-thinking": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-next-80b-a3b-thinking", - "knowledge": "2024-12", - "last_updated": "2025-09-05", - "limit": { - "context": 262144, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3-Next-80B-A3B-Thinking", - "open_weights": true, - "reasoning": true, - "release_date": "2024-12-01", - "temperature": true, - "tool_call": true - } - }, - "name": "Nvidia", - "npm": "@ai-sdk/openai-compatible" - }, - "openai": { - "doc": "https://platform.openai.com/docs/models", - "env": [ - "OPENAI_API_KEY" - ], - "id": "openai", - "models": { - "codex-mini-latest": { - "attachment": true, - "cost": { - "cache_read": 0.375, - "input": 1.5, - "output": 6 - }, - "id": "codex-mini-latest", - "knowledge": "2024-04", - "last_updated": "2025-05-16", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Codex Mini", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-16", - "temperature": false, - "tool_call": true - }, - "gpt-3.5-turbo": { - "attachment": false, - "cost": { - "cache_read": 1.25, - "input": 0.5, - "output": 1.5 - }, - "id": "gpt-3.5-turbo", - "knowledge": "2021-09-01", - "last_updated": "2023-11-06", - "limit": { - "context": 16385, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT-3.5-turbo", - "open_weights": false, - "reasoning": false, - "release_date": "2023-03-01", - "temperature": true, - "tool_call": false - }, - "gpt-4": { - "attachment": true, - "cost": { - "input": 30, - "output": 60 - }, - "id": "gpt-4", - "knowledge": "2023-11", - "last_updated": "2024-04-09", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4", - "open_weights": false, - "reasoning": false, - "release_date": "2023-11-06", - "temperature": true, - "tool_call": true - }, - "gpt-4-turbo": { - "attachment": true, - "cost": { - "input": 10, - "output": 30 - }, - "id": "gpt-4-turbo", - "knowledge": "2023-12", - "last_updated": "2024-04-09", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4 Turbo", - "open_weights": false, - "reasoning": false, - "release_date": "2023-11-06", - "temperature": true, - "tool_call": true - }, - "gpt-4.1": { - "attachment": true, - "cost": { - "cache_read": 0.5, - "input": 2, - "output": 8 - }, - "id": "gpt-4.1", - "knowledge": "2024-04", - "last_updated": "2025-04-14", - "limit": { - "context": 1047576, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4.1", - "open_weights": false, - "reasoning": false, - "release_date": "2025-04-14", - "temperature": true, - "tool_call": true - }, - "gpt-4.1-mini": { - "attachment": true, - "cost": { - "cache_read": 0.1, - "input": 0.4, - "output": 1.6 - }, - "id": "gpt-4.1-mini", - "knowledge": "2024-04", - "last_updated": "2025-04-14", - "limit": { - "context": 1047576, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4.1 mini", - "open_weights": false, - "reasoning": false, - "release_date": "2025-04-14", - "temperature": true, - "tool_call": true - }, - "gpt-4.1-nano": { - "attachment": true, - "cost": { - "cache_read": 0.03, - "input": 0.1, - "output": 0.4 - }, - "id": "gpt-4.1-nano", - "knowledge": "2024-04", - "last_updated": "2025-04-14", - "limit": { - "context": 1047576, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4.1 nano", - "open_weights": false, - "reasoning": false, - "release_date": "2025-04-14", - "temperature": true, - "tool_call": true - }, - "gpt-4o": { - "attachment": true, - "cost": { - "cache_read": 1.25, - "input": 2.5, - "output": 10 - }, - "id": "gpt-4o", - "knowledge": "2023-09", - "last_updated": "2024-08-06", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4o", - "open_weights": false, - "reasoning": false, - "release_date": "2024-05-13", - "temperature": true, - "tool_call": true - }, - "gpt-4o-2024-05-13": { - "attachment": true, - "cost": { - "input": 5, - "output": 15 - }, - "id": "gpt-4o-2024-05-13", - "knowledge": "2023-09", - "last_updated": "2024-05-13", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4o (2024-05-13)", - "open_weights": false, - "reasoning": false, - "release_date": "2024-05-13", - "temperature": true, - "tool_call": true - }, - "gpt-4o-2024-08-06": { - "attachment": true, - "cost": { - "cache_read": 1.25, - "input": 2.5, - "output": 10 - }, - "id": "gpt-4o-2024-08-06", - "knowledge": "2023-09", - "last_updated": "2024-08-06", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4o (2024-08-06)", - "open_weights": false, - "reasoning": false, - "release_date": "2024-08-06", - "temperature": true, - "tool_call": true - }, - "gpt-4o-2024-11-20": { - "attachment": true, - "cost": { - "cache_read": 1.25, - "input": 2.5, - "output": 10 - }, - "id": "gpt-4o-2024-11-20", - "knowledge": "2023-09", - "last_updated": "2024-11-20", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4o (2024-11-20)", - "open_weights": false, - "reasoning": false, - "release_date": "2024-11-20", - "temperature": true, - "tool_call": true - }, - "gpt-4o-mini": { - "attachment": true, - "cost": { - "cache_read": 0.08, - "input": 0.15, - "output": 0.6 - }, - "id": "gpt-4o-mini", - "knowledge": "2023-09", - "last_updated": "2024-07-18", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4o mini", - "open_weights": false, - "reasoning": false, - "release_date": "2024-07-18", - "temperature": true, - "tool_call": true - }, - "gpt-5": { - "attachment": true, - "cost": { - "cache_read": 0.13, - "input": 1.25, - "output": 10 - }, - "id": "gpt-5", - "knowledge": "2024-09-30", - "last_updated": "2025-08-07", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": false, - "tool_call": true - }, - "gpt-5-chat-latest": { - "attachment": true, - "cost": { - "input": 1.25, - "output": 10 - }, - "id": "gpt-5-chat-latest", - "knowledge": "2024-09-30", - "last_updated": "2025-08-07", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Chat (latest)", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": true, - "tool_call": false - }, - "gpt-5-codex": { - "attachment": false, - "cost": { - "cache_read": 0.125, - "input": 1.25, - "output": 10 - }, - "id": "gpt-5-codex", - "knowledge": "2024-09-30", - "last_updated": "2025-09-15", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5-Codex", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-15", - "temperature": false, - "tool_call": true - }, - "gpt-5-mini": { - "attachment": true, - "cost": { - "cache_read": 0.03, - "input": 0.25, - "output": 2 - }, - "id": "gpt-5-mini", - "knowledge": "2024-05-30", - "last_updated": "2025-08-07", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Mini", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": false, - "tool_call": true - }, - "gpt-5-nano": { - "attachment": true, - "cost": { - "cache_read": 0.01, - "input": 0.05, - "output": 0.4 - }, - "id": "gpt-5-nano", - "knowledge": "2024-05-30", - "last_updated": "2025-08-07", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Nano", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": false, - "tool_call": true - }, - "gpt-5-pro": { - "attachment": true, - "cost": { - "input": 15, - "output": 120 - }, - "id": "gpt-5-pro", - "knowledge": "2024-09-30", - "last_updated": "2025-10-06", - "limit": { - "context": 400000, - "output": 272000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Pro", - "open_weights": false, - "reasoning": true, - "release_date": "2025-10-06", - "temperature": false, - "tool_call": true - }, - "o1": { - "attachment": true, - "cost": { - "cache_read": 7.5, - "input": 15, - "output": 60 - }, - "id": "o1", - "knowledge": "2023-09", - "last_updated": "2024-12-05", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o1", - "open_weights": false, - "reasoning": true, - "release_date": "2024-12-05", - "temperature": false, - "tool_call": true - }, - "o1-mini": { - "attachment": false, - "cost": { - "cache_read": 0.55, - "input": 1.1, - "output": 4.4 - }, - "id": "o1-mini", - "knowledge": "2023-09", - "last_updated": "2024-09-12", - "limit": { - "context": 128000, - "output": 65536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "o1-mini", - "open_weights": false, - "reasoning": true, - "release_date": "2024-09-12", - "temperature": false, - "tool_call": false - }, - "o1-preview": { - "attachment": false, - "cost": { - "cache_read": 7.5, - "input": 15, - "output": 60 - }, - "id": "o1-preview", - "knowledge": "2023-09", - "last_updated": "2024-09-12", - "limit": { - "context": 128000, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "o1-preview", - "open_weights": false, - "reasoning": true, - "release_date": "2024-09-12", - "temperature": true, - "tool_call": false - }, - "o1-pro": { - "attachment": true, - "cost": { - "input": 150, - "output": 600 - }, - "id": "o1-pro", - "knowledge": "2023-09", - "last_updated": "2025-03-19", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o1-pro", - "open_weights": false, - "reasoning": true, - "release_date": "2025-03-19", - "temperature": false, - "tool_call": true - }, - "o3": { - "attachment": true, - "cost": { - "cache_read": 0.5, - "input": 2, - "output": 8 - }, - "id": "o3", - "knowledge": "2024-05", - "last_updated": "2025-04-16", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o3", - "open_weights": false, - "reasoning": true, - "release_date": "2025-04-16", - "temperature": false, - "tool_call": true - }, - "o3-deep-research": { - "attachment": true, - "cost": { - "cache_read": 2.5, - "input": 10, - "output": 40 - }, - "id": "o3-deep-research", - "knowledge": "2024-05", - "last_updated": "2024-06-26", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o3-deep-research", - "open_weights": false, - "reasoning": true, - "release_date": "2024-06-26", - "temperature": false, - "tool_call": true - }, - "o3-mini": { - "attachment": false, - "cost": { - "cache_read": 0.55, - "input": 1.1, - "output": 4.4 - }, - "id": "o3-mini", - "knowledge": "2024-05", - "last_updated": "2025-01-29", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "o3-mini", - "open_weights": false, - "reasoning": true, - "release_date": "2024-12-20", - "temperature": false, - "tool_call": true - }, - "o3-pro": { - "attachment": true, - "cost": { - "input": 20, - "output": 80 - }, - "id": "o3-pro", - "knowledge": "2024-05", - "last_updated": "2025-06-10", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o3-pro", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-10", - "temperature": false, - "tool_call": true - }, - "o4-mini": { - "attachment": true, - "cost": { - "cache_read": 0.28, - "input": 1.1, - "output": 4.4 - }, - "id": "o4-mini", - "knowledge": "2024-05", - "last_updated": "2025-04-16", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o4-mini", - "open_weights": false, - "reasoning": true, - "release_date": "2025-04-16", - "temperature": false, - "tool_call": true - }, - "o4-mini-deep-research": { - "attachment": true, - "cost": { - "cache_read": 0.5, - "input": 2, - "output": 8 - }, - "id": "o4-mini-deep-research", - "knowledge": "2024-05", - "last_updated": "2024-06-26", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o4-mini-deep-research", - "open_weights": false, - "reasoning": true, - "release_date": "2024-06-26", - "temperature": false, - "tool_call": true - }, - "text-embedding-3-large": { - "attachment": false, - "cost": { - "input": 0.13, - "output": 0 - }, - "id": "text-embedding-3-large", - "knowledge": "2024-01", - "last_updated": "2024-01-25", - "limit": { - "context": 8191, - "output": 3072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "text-embedding-3-large", - "open_weights": false, - "reasoning": false, - "release_date": "2024-01-25", - "temperature": false, - "tool_call": false - }, - "text-embedding-3-small": { - "attachment": false, - "cost": { - "input": 0.02, - "output": 0 - }, - "id": "text-embedding-3-small", - "knowledge": "2024-01", - "last_updated": "2024-01-25", - "limit": { - "context": 8191, - "output": 1536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "text-embedding-3-small", - "open_weights": false, - "reasoning": false, - "release_date": "2024-01-25", - "temperature": false, - "tool_call": false - }, - "text-embedding-ada-002": { - "attachment": false, - "cost": { - "input": 0.1, - "output": 0 - }, - "id": "text-embedding-ada-002", - "knowledge": "2022-12", - "last_updated": "2022-12-15", - "limit": { - "context": 8192, - "output": 1536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "text-embedding-ada-002", - "open_weights": false, - "reasoning": false, - "release_date": "2022-12-15", - "temperature": false, - "tool_call": false - } - }, - "name": "OpenAI", - "npm": "@ai-sdk/openai" - }, - "openrouter": { - "api": "https://openrouter.ai/api/v1", - "doc": "https://openrouter.ai/models", - "env": [ - "OPENROUTER_API_KEY" - ], - "id": "openrouter", - "models": { - "anthropic/claude-3.5-haiku": { - "attachment": true, - "cost": { - "cache_read": 0.08, - "cache_write": 1, - "input": 0.8, - "output": 4 - }, - "id": "anthropic/claude-3.5-haiku", - "knowledge": "2024-07-31", - "last_updated": "2024-10-22", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 3.5", - "open_weights": false, - "reasoning": false, - "release_date": "2024-10-22", - "temperature": true, - "tool_call": true - }, - "anthropic/claude-3.7-sonnet": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "anthropic/claude-3.7-sonnet", - "knowledge": "2024-01", - "last_updated": "2025-02-19", - "limit": { - "context": 200000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 3.7", - "open_weights": false, - "reasoning": true, - "release_date": "2025-02-19", - "temperature": true, - "tool_call": true - }, - "anthropic/claude-haiku-4.5": { - "attachment": true, - "cost": { - "cache_read": 0.1, - "cache_write": 1.25, - "input": 1, - "output": 5 - }, - "id": "anthropic/claude-haiku-4.5", - "knowledge": "2025-02-31", - "last_updated": "2025-10-15", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Haiku 4.5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-10-15", - "temperature": true, - "tool_call": true - }, - "anthropic/claude-opus-4": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "anthropic/claude-opus-4", - "knowledge": "2025-03-31", - "last_updated": "2025-05-22", - "limit": { - "context": 200000, - "output": 32000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 4", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-22", - "temperature": true, - "tool_call": true - }, - "anthropic/claude-opus-4.1": { - "attachment": true, - "cost": { - "cache_read": 1.5, - "cache_write": 18.75, - "input": 15, - "output": 75 - }, - "id": "anthropic/claude-opus-4.1", - "knowledge": "2025-03-31", - "last_updated": "2025-08-05", - "limit": { - "context": 200000, - "output": 32000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Opus 4.1", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "anthropic/claude-sonnet-4": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "anthropic/claude-sonnet-4", - "knowledge": "2025-03-31", - "last_updated": "2025-05-22", - "limit": { - "context": 200000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 4", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-22", - "temperature": true, - "tool_call": true - }, - "anthropic/claude-sonnet-4.5": { - "attachment": true, - "cost": { - "cache_read": 0.3, - "cache_write": 3.75, - "input": 3, - "output": 15 - }, - "id": "anthropic/claude-sonnet-4.5", - "knowledge": "2025-07-31", - "last_updated": "2025-09-29", - "limit": { - "context": 1000000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Claude Sonnet 4.5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-29", - "temperature": true, - "tool_call": true - }, - "cognitivecomputations/dolphin3.0-mistral-24b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "cognitivecomputations/dolphin3.0-mistral-24b", - "knowledge": "2024-10", - "last_updated": "2025-02-13", - "limit": { - "context": 32768, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Dolphin3.0 Mistral 24B", - "open_weights": true, - "reasoning": false, - "release_date": "2025-02-13", - "temperature": true, - "tool_call": true - }, - "cognitivecomputations/dolphin3.0-r1-mistral-24b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "cognitivecomputations/dolphin3.0-r1-mistral-24b", - "knowledge": "2024-10", - "last_updated": "2025-02-13", - "limit": { - "context": 32768, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Dolphin3.0 R1 Mistral 24B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-02-13", - "temperature": true, - "tool_call": true - }, - "deepseek/deepseek-chat-v3-0324": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek/deepseek-chat-v3-0324", - "knowledge": "2024-10", - "last_updated": "2025-03-24", - "limit": { - "context": 16384, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek V3 0324", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-24", - "temperature": true, - "tool_call": false - }, - "deepseek/deepseek-chat-v3.1": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.8 - }, - "id": "deepseek/deepseek-chat-v3.1", - "knowledge": "2025-07", - "last_updated": "2025-08-21", - "limit": { - "context": 163840, - "output": 163840 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek-V3.1", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-21", - "temperature": true, - "tool_call": true - }, - "deepseek/deepseek-r1-0528-qwen3-8b:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek/deepseek-r1-0528-qwen3-8b:free", - "knowledge": "2025-05", - "last_updated": "2025-05-29", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Deepseek R1 0528 Qwen3 8B (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-05-29", - "temperature": true, - "tool_call": true - }, - "deepseek/deepseek-r1-0528:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek/deepseek-r1-0528:free", - "knowledge": "2025-05", - "last_updated": "2025-05-28", - "limit": { - "context": 163840, - "output": 163840 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "R1 0528 (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-05-28", - "temperature": true, - "tool_call": true - }, - "deepseek/deepseek-r1-distill-llama-70b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek/deepseek-r1-distill-llama-70b", - "knowledge": "2024-10", - "last_updated": "2025-01-23", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek R1 Distill Llama 70B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-01-23", - "temperature": true, - "tool_call": false - }, - "deepseek/deepseek-r1-distill-qwen-14b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek/deepseek-r1-distill-qwen-14b", - "knowledge": "2024-10", - "last_updated": "2025-01-29", - "limit": { - "context": 64000, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek R1 Distill Qwen 14B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-01-29", - "temperature": true, - "tool_call": false - }, - "deepseek/deepseek-r1:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek/deepseek-r1:free", - "knowledge": "2025-01", - "last_updated": "2025-01-20", - "limit": { - "context": 163840, - "output": 163840 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "R1 (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-01-20", - "temperature": true, - "tool_call": true - }, - "deepseek/deepseek-v3-base:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "deepseek/deepseek-v3-base:free", - "knowledge": "2025-03", - "last_updated": "2025-03-29", - "limit": { - "context": 163840, - "output": 163840 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek V3 Base (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-29", - "temperature": true, - "tool_call": false - }, - "deepseek/deepseek-v3.1-terminus": { - "attachment": false, - "cost": { - "input": 0.27, - "output": 1 - }, - "id": "deepseek/deepseek-v3.1-terminus", - "knowledge": "2025-07", - "last_updated": "2025-09-22", - "limit": { - "context": 131072, - "output": 65536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek V3.1 Terminus", - "open_weights": true, - "reasoning": true, - "release_date": "2025-09-22", - "temperature": true, - "tool_call": true - }, - "deepseek/deepseek-v3.1-terminus:exacto": { - "attachment": false, - "cost": { - "input": 0.27, - "output": 1 - }, - "id": "deepseek/deepseek-v3.1-terminus:exacto", - "knowledge": "2025-07", - "last_updated": "2025-09-22", - "limit": { - "context": 131072, - "output": 65536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek V3.1 Terminus (exacto)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-09-22", - "temperature": true, - "tool_call": true - }, - "featherless/qwerky-72b": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "featherless/qwerky-72b", - "knowledge": "2024-10", - "last_updated": "2025-03-20", - "limit": { - "context": 32768, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwerky 72B", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-20", - "temperature": true, - "tool_call": false - }, - "google/gemini-2.0-flash-001": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "google/gemini-2.0-flash-001", - "knowledge": "2024-06", - "last_updated": "2024-12-11", - "limit": { - "context": 1048576, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.0 Flash", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-11", - "temperature": true, - "tool_call": true - }, - "google/gemini-2.0-flash-exp:free": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "google/gemini-2.0-flash-exp:free", - "knowledge": "2024-12", - "last_updated": "2024-12-11", - "limit": { - "context": 1048576, - "output": 1048576 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.0 Flash Experimental (free)", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-11", - "temperature": true, - "tool_call": true - }, - "google/gemini-2.5-flash": { - "attachment": true, - "cost": { - "cache_read": 0.0375, - "input": 0.3, - "output": 2.5 - }, - "id": "google/gemini-2.5-flash", - "knowledge": "2025-01", - "last_updated": "2025-07-17", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash", - "open_weights": false, - "reasoning": true, - "release_date": "2025-07-17", - "temperature": true, - "tool_call": true - }, - "google/gemini-2.5-flash-lite": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "google/gemini-2.5-flash-lite", - "knowledge": "2025-01", - "last_updated": "2025-06-17", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Lite", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-17", - "temperature": true, - "tool_call": true - }, - "google/gemini-2.5-flash-lite-preview-09-2025": { - "attachment": true, - "cost": { - "cache_read": 0.025, - "input": 0.1, - "output": 0.4 - }, - "id": "google/gemini-2.5-flash-lite-preview-09-2025", - "knowledge": "2025-01", - "last_updated": "2025-09-25", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Lite Preview 09-25", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-25", - "temperature": true, - "tool_call": true - }, - "google/gemini-2.5-flash-preview-09-2025": { - "attachment": true, - "cost": { - "cache_read": 0.031, - "input": 0.3, - "output": 2.5 - }, - "id": "google/gemini-2.5-flash-preview-09-2025", - "knowledge": "2025-01", - "last_updated": "2025-09-25", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Flash Preview 09-25", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-25", - "temperature": true, - "tool_call": true - }, - "google/gemini-2.5-pro": { - "attachment": true, - "cost": { - "cache_read": 0.31, - "input": 1.25, - "output": 10 - }, - "id": "google/gemini-2.5-pro", - "knowledge": "2025-01", - "last_updated": "2025-06-05", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Pro", - "open_weights": false, - "reasoning": true, - "release_date": "2025-03-20", - "temperature": true, - "tool_call": true - }, - "google/gemini-2.5-pro-preview-05-06": { - "attachment": true, - "cost": { - "cache_read": 0.31, - "input": 1.25, - "output": 10 - }, - "id": "google/gemini-2.5-pro-preview-05-06", - "knowledge": "2025-01", - "last_updated": "2025-05-06", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Pro Preview 05-06", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-06", - "temperature": true, - "tool_call": true - }, - "google/gemini-2.5-pro-preview-06-05": { - "attachment": true, - "cost": { - "cache_read": 0.31, - "input": 1.25, - "output": 10 - }, - "id": "google/gemini-2.5-pro-preview-06-05", - "knowledge": "2025-01", - "last_updated": "2025-06-05", - "limit": { - "context": 1048576, - "output": 65536 - }, - "modalities": { - "input": [ - "text", - "image", - "audio", - "video", - "pdf" - ], - "output": [ - "text" - ] - }, - "name": "Gemini 2.5 Pro Preview 06-05", - "open_weights": false, - "reasoning": true, - "release_date": "2025-06-05", - "temperature": true, - "tool_call": true - }, - "google/gemma-2-9b-it:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "google/gemma-2-9b-it:free", - "knowledge": "2024-06", - "last_updated": "2024-06-28", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Gemma 2 9B (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2024-06-28", - "temperature": true, - "tool_call": true - }, - "google/gemma-3-12b-it": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "google/gemma-3-12b-it", - "knowledge": "2024-10", - "last_updated": "2025-03-13", - "limit": { - "context": 96000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Gemma 3 12B IT", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-13", - "temperature": true, - "tool_call": true - }, - "google/gemma-3-27b-it": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "google/gemma-3-27b-it", - "knowledge": "2024-10", - "last_updated": "2025-03-12", - "limit": { - "context": 96000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Gemma 3 27B IT", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-12", - "temperature": true, - "tool_call": true - }, - "google/gemma-3n-e4b-it": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "google/gemma-3n-e4b-it", - "knowledge": "2024-10", - "last_updated": "2025-05-20", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio" - ], - "output": [ - "text" - ] - }, - "name": "Gemma 3n E4B IT", - "open_weights": true, - "reasoning": false, - "release_date": "2025-05-20", - "temperature": true, - "tool_call": false - }, - "google/gemma-3n-e4b-it:free": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "google/gemma-3n-e4b-it:free", - "knowledge": "2025-05", - "last_updated": "2025-05-20", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "audio" - ], - "output": [ - "text" - ] - }, - "name": "Gemma 3n 4B (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-05-20", - "temperature": true, - "tool_call": true - }, - "meta-llama/llama-3.2-11b-vision-instruct": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "meta-llama/llama-3.2-11b-vision-instruct", - "knowledge": "2023-12", - "last_updated": "2024-09-25", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.2 11B Vision Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-09-25", - "temperature": true, - "tool_call": false - }, - "meta-llama/llama-3.3-70b-instruct:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "meta-llama/llama-3.3-70b-instruct:free", - "knowledge": "2024-12", - "last_updated": "2024-12-06", - "limit": { - "context": 65536, - "output": 65536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.3 70B Instruct (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2024-12-06", - "temperature": true, - "tool_call": true - }, - "meta-llama/llama-4-scout:free": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "meta-llama/llama-4-scout:free", - "knowledge": "2024-08", - "last_updated": "2025-04-05", - "limit": { - "context": 64000, - "output": 64000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Llama 4 Scout (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-04-05", - "temperature": true, - "tool_call": true - }, - "microsoft/mai-ds-r1:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "microsoft/mai-ds-r1:free", - "knowledge": "2025-04", - "last_updated": "2025-04-21", - "limit": { - "context": 163840, - "output": 163840 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "MAI DS R1 (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-04-21", - "temperature": true, - "tool_call": true - }, - "minimax/minimax-01": { - "attachment": true, - "cost": { - "input": 0.2, - "output": 1.1 - }, - "id": "minimax/minimax-01", - "last_updated": "2025-01-15", - "limit": { - "context": 1000000, - "output": 1000000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "MiniMax-01", - "open_weights": true, - "reasoning": true, - "release_date": "2025-01-15", - "temperature": true, - "tool_call": true - }, - "minimax/minimax-m1": { - "attachment": false, - "cost": { - "input": 0.4, - "output": 2.2 - }, - "id": "minimax/minimax-m1", - "last_updated": "2025-06-17", - "limit": { - "context": 1000000, - "output": 40000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "MiniMax M1", - "open_weights": true, - "reasoning": true, - "release_date": "2025-06-17", - "temperature": true, - "tool_call": true - }, - "minimax/minimax-m2:free": { - "attachment": false, - "cost": { - "cache_read": 0, - "cache_write": 0, - "input": 0, - "output": 0 - }, - "id": "minimax/minimax-m2:free", - "last_updated": "2025-10-23", - "limit": { - "context": 204800, - "output": 131100 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "MiniMax M2 (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-10-23", - "temperature": true, - "tool_call": true - }, - "mistralai/codestral-2508": { - "attachment": false, - "cost": { - "input": 0.3, - "output": 0.9 - }, - "id": "mistralai/codestral-2508", - "knowledge": "2025-05", - "last_updated": "2025-08-01", - "limit": { - "context": 256000, - "output": 256000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Codestral 2508", - "open_weights": true, - "reasoning": false, - "release_date": "2025-08-01", - "temperature": true, - "tool_call": true - }, - "mistralai/devstral-medium-2507": { - "attachment": false, - "cost": { - "input": 0.4, - "output": 2 - }, - "id": "mistralai/devstral-medium-2507", - "knowledge": "2025-05", - "last_updated": "2025-07-10", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Devstral Medium", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-10", - "temperature": true, - "tool_call": true - }, - "mistralai/devstral-small-2505": { - "attachment": false, - "cost": { - "input": 0.06, - "output": 0.12 - }, - "id": "mistralai/devstral-small-2505", - "knowledge": "2025-05", - "last_updated": "2025-05-07", - "limit": { - "context": 128000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Devstral Small", - "open_weights": true, - "reasoning": false, - "release_date": "2025-05-07", - "temperature": true, - "tool_call": true - }, - "mistralai/devstral-small-2505:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "mistralai/devstral-small-2505:free", - "knowledge": "2025-05", - "last_updated": "2025-05-21", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Devstral Small 2505 (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-05-21", - "temperature": true, - "tool_call": true - }, - "mistralai/devstral-small-2507": { - "attachment": false, - "cost": { - "input": 0.1, - "output": 0.3 - }, - "id": "mistralai/devstral-small-2507", - "knowledge": "2025-05", - "last_updated": "2025-07-10", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Devstral Small 1.1", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-10", - "temperature": true, - "tool_call": true - }, - "mistralai/mistral-7b-instruct:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "mistralai/mistral-7b-instruct:free", - "knowledge": "2024-05", - "last_updated": "2024-05-27", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Mistral 7B Instruct (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2024-05-27", - "temperature": true, - "tool_call": true - }, - "mistralai/mistral-medium-3": { - "attachment": true, - "cost": { - "input": 0.4, - "output": 2 - }, - "id": "mistralai/mistral-medium-3", - "knowledge": "2025-05", - "last_updated": "2025-05-07", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Medium 3", - "open_weights": false, - "reasoning": false, - "release_date": "2025-05-07", - "temperature": true, - "tool_call": true - }, - "mistralai/mistral-medium-3.1": { - "attachment": true, - "cost": { - "input": 0.4, - "output": 2 - }, - "id": "mistralai/mistral-medium-3.1", - "knowledge": "2025-05", - "last_updated": "2025-08-12", - "limit": { - "context": 262144, - "output": 262144 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Medium 3.1", - "open_weights": false, - "reasoning": false, - "release_date": "2025-08-12", - "temperature": true, - "tool_call": true - }, - "mistralai/mistral-nemo:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "mistralai/mistral-nemo:free", - "knowledge": "2024-07", - "last_updated": "2024-07-19", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Nemo (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2024-07-19", - "temperature": true, - "tool_call": true - }, - "mistralai/mistral-small-3.1-24b-instruct": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "mistralai/mistral-small-3.1-24b-instruct", - "knowledge": "2024-10", - "last_updated": "2025-03-17", - "limit": { - "context": 128000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Small 3.1 24B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-17", - "temperature": true, - "tool_call": true - }, - "mistralai/mistral-small-3.2-24b-instruct": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "mistralai/mistral-small-3.2-24b-instruct", - "knowledge": "2024-10", - "last_updated": "2025-06-20", - "limit": { - "context": 96000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Small 3.2 24B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-06-20", - "temperature": true, - "tool_call": true - }, - "mistralai/mistral-small-3.2-24b-instruct:free": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "mistralai/mistral-small-3.2-24b-instruct:free", - "knowledge": "2025-06", - "last_updated": "2025-06-20", - "limit": { - "context": 96000, - "output": 96000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Mistral Small 3.2 24B (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-06-20", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-dev-72b:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "moonshotai/kimi-dev-72b:free", - "knowledge": "2025-06", - "last_updated": "2025-06-16", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi Dev 72b (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-06-16", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-k2": { - "attachment": false, - "cost": { - "input": 0.55, - "output": 2.2 - }, - "id": "moonshotai/kimi-k2", - "knowledge": "2024-10", - "last_updated": "2025-07-11", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-11", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-k2-0905": { - "attachment": false, - "cost": { - "input": 0.6, - "output": 2.5 - }, - "id": "moonshotai/kimi-k2-0905", - "knowledge": "2024-10", - "last_updated": "2025-09-05", - "limit": { - "context": 262144, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 Instruct 0905", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-05", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-k2-0905:exacto": { - "attachment": false, - "cost": { - "input": 0.6, - "output": 2.5 - }, - "id": "moonshotai/kimi-k2-0905:exacto", - "knowledge": "2024-10", - "last_updated": "2025-09-05", - "limit": { - "context": 262144, - "output": 16384 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 Instruct 0905 (exacto)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-05", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-k2-thinking": { - "attachment": false, - "cost": { - "cache_read": 0.15, - "input": 0.6, - "output": 2.5 - }, - "id": "moonshotai/kimi-k2-thinking", - "knowledge": "2024-08", - "last_updated": "2025-11-06", - "limit": { - "context": 262144, - "output": 262144 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 Thinking", - "open_weights": true, - "reasoning": true, - "release_date": "2025-11-06", - "temperature": true, - "tool_call": true - }, - "moonshotai/kimi-k2:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "moonshotai/kimi-k2:free", - "knowledge": "2025-04", - "last_updated": "2025-07-11", - "limit": { - "context": 32800, - "output": 32800 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-11", - "temperature": true, - "tool_call": true - }, - "nousresearch/deephermes-3-llama-3-8b-preview": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "nousresearch/deephermes-3-llama-3-8b-preview", - "knowledge": "2024-04", - "last_updated": "2025-02-28", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepHermes 3 Llama 3 8B Preview", - "open_weights": true, - "reasoning": true, - "release_date": "2025-02-28", - "temperature": true, - "tool_call": true - }, - "nousresearch/hermes-4-405b": { - "attachment": false, - "cost": { - "input": 1, - "output": 3 - }, - "id": "nousresearch/hermes-4-405b", - "knowledge": "2023-12", - "last_updated": "2025-08-25", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Hermes 4 405B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-25", - "temperature": true, - "tool_call": true - }, - "nousresearch/hermes-4-70b": { - "attachment": false, - "cost": { - "input": 0.13, - "output": 0.4 - }, - "id": "nousresearch/hermes-4-70b", - "knowledge": "2023-12", - "last_updated": "2025-08-25", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Hermes 4 70B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-25", - "temperature": true, - "tool_call": true - }, - "nvidia/nemotron-nano-9b-v2": { - "attachment": false, - "cost": { - "input": 0.04, - "output": 0.16 - }, - "id": "nvidia/nemotron-nano-9b-v2", - "knowledge": "2024-09", - "last_updated": "2025-08-18", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "nvidia-nemotron-nano-9b-v2", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-18", - "temperature": true, - "tool_call": true - }, - "openai/gpt-4.1": { - "attachment": true, - "cost": { - "cache_read": 0.5, - "input": 2, - "output": 8 - }, - "id": "openai/gpt-4.1", - "knowledge": "2024-04", - "last_updated": "2025-04-14", - "limit": { - "context": 1047576, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4.1", - "open_weights": false, - "reasoning": false, - "release_date": "2025-04-14", - "temperature": true, - "tool_call": true - }, - "openai/gpt-4.1-mini": { - "attachment": true, - "cost": { - "cache_read": 0.1, - "input": 0.4, - "output": 1.6 - }, - "id": "openai/gpt-4.1-mini", - "knowledge": "2024-04", - "last_updated": "2025-04-14", - "limit": { - "context": 1047576, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4.1 Mini", - "open_weights": false, - "reasoning": false, - "release_date": "2025-04-14", - "temperature": true, - "tool_call": true - }, - "openai/gpt-4o-mini": { - "attachment": true, - "cost": { - "cache_read": 0.08, - "input": 0.15, - "output": 0.6 - }, - "id": "openai/gpt-4o-mini", - "knowledge": "2024-10", - "last_updated": "2024-07-18", - "limit": { - "context": 128000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-4o-mini", - "open_weights": false, - "reasoning": false, - "release_date": "2024-07-18", - "temperature": true, - "tool_call": true - }, - "openai/gpt-5": { - "attachment": true, - "cost": { - "input": 1.25, - "output": 10 - }, - "id": "openai/gpt-5", - "knowledge": "2024-10-01", - "last_updated": "2025-08-07", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": true, - "tool_call": true - }, - "openai/gpt-5-chat": { - "attachment": true, - "cost": { - "input": 1.25, - "output": 10 - }, - "id": "openai/gpt-5-chat", - "knowledge": "2024-09-30", - "last_updated": "2025-08-07", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Chat (latest)", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": true, - "tool_call": false - }, - "openai/gpt-5-codex": { - "attachment": true, - "cost": { - "cache_read": 0.125, - "input": 1.25, - "output": 10 - }, - "id": "openai/gpt-5-codex", - "knowledge": "2024-10-01", - "last_updated": "2025-09-15", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Codex", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-15", - "temperature": true, - "tool_call": true - }, - "openai/gpt-5-image": { - "attachment": true, - "cost": { - "cache_read": 1.25, - "input": 5, - "output": 10 - }, - "id": "openai/gpt-5-image", - "knowledge": "2024-10-01", - "last_updated": "2025-10-14", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image", - "pdf" - ], - "output": [ - "text", - "image" - ] - }, - "name": "GPT-5 Image", - "open_weights": false, - "reasoning": true, - "release_date": "2025-10-14", - "temperature": true, - "tool_call": true - }, - "openai/gpt-5-mini": { - "attachment": true, - "cost": { - "input": 0.25, - "output": 2 - }, - "id": "openai/gpt-5-mini", - "knowledge": "2024-10-01", - "last_updated": "2025-08-07", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Mini", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": true, - "tool_call": true - }, - "openai/gpt-5-nano": { - "attachment": true, - "cost": { - "input": 0.05, - "output": 0.4 - }, - "id": "openai/gpt-5-nano", - "knowledge": "2024-10-01", - "last_updated": "2025-08-07", - "limit": { - "context": 400000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Nano", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-07", - "temperature": true, - "tool_call": true - }, - "openai/gpt-5-pro": { - "attachment": true, - "cost": { - "input": 15, - "output": 120 - }, - "id": "openai/gpt-5-pro", - "knowledge": "2024-09-30", - "last_updated": "2025-10-06", - "limit": { - "context": 400000, - "output": 272000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "GPT-5 Pro", - "open_weights": false, - "reasoning": true, - "release_date": "2025-10-06", - "temperature": false, - "tool_call": true - }, - "openai/gpt-oss-120b": { - "attachment": false, - "cost": { - "input": 0.072, - "output": 0.28 - }, - "id": "openai/gpt-oss-120b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 120B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "openai/gpt-oss-120b:exacto": { - "attachment": false, - "cost": { - "input": 0.05, - "output": 0.24 - }, - "id": "openai/gpt-oss-120b:exacto", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 120B (exacto)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "openai/gpt-oss-20b": { - "attachment": false, - "cost": { - "input": 0.05, - "output": 0.2 - }, - "id": "openai/gpt-oss-20b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 20B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - }, - "openai/o4-mini": { - "attachment": true, - "cost": { - "cache_read": 0.28, - "input": 1.1, - "output": 4.4 - }, - "id": "openai/o4-mini", - "knowledge": "2024-06", - "last_updated": "2025-04-16", - "limit": { - "context": 200000, - "output": 100000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "o4 Mini", - "open_weights": false, - "reasoning": true, - "release_date": "2025-04-16", - "temperature": true, - "tool_call": true - }, - "openrouter/cypher-alpha:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openrouter/cypher-alpha:free", - "knowledge": "2025-07", - "last_updated": "2025-07-01", - "limit": { - "context": 1000000, - "output": 1000000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Cypher Alpha (free)", - "open_weights": false, - "reasoning": false, - "release_date": "2025-07-01", - "temperature": true, - "tool_call": true - }, - "openrouter/horizon-alpha": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openrouter/horizon-alpha", - "knowledge": "2025-07", - "last_updated": "2025-07-30", - "limit": { - "context": 256000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Horizon Alpha", - "open_weights": false, - "reasoning": false, - "release_date": "2025-07-30", - "temperature": false, - "tool_call": true - }, - "openrouter/horizon-beta": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openrouter/horizon-beta", - "knowledge": "2025-07", - "last_updated": "2025-08-01", - "limit": { - "context": 256000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Horizon Beta", - "open_weights": false, - "reasoning": false, - "release_date": "2025-08-01", - "temperature": false, - "tool_call": true - }, - "openrouter/polaris-alpha": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openrouter/polaris-alpha", - "knowledge": "2025-07", - "last_updated": "2025-07-30", - "limit": { - "context": 256000, - "output": 128000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Polaris Alpha", - "open_weights": false, - "reasoning": false, - "release_date": "2025-07-30", - "temperature": false, - "tool_call": true - }, - "openrouter/sonoma-dusk-alpha": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openrouter/sonoma-dusk-alpha", - "last_updated": "2024-09-05", - "limit": { - "context": 2000000, - "output": 2000000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Sonoma Dusk Alpha", - "open_weights": false, - "reasoning": false, - "release_date": "2024-09-05", - "temperature": false, - "tool_call": true - }, - "openrouter/sonoma-sky-alpha": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "openrouter/sonoma-sky-alpha", - "last_updated": "2024-09-05", - "limit": { - "context": 2000000, - "output": 2000000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Sonoma Sky Alpha", - "open_weights": false, - "reasoning": false, - "release_date": "2024-09-05", - "temperature": false, - "tool_call": true - }, - "qwen/qwen-2.5-coder-32b-instruct": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen-2.5-coder-32b-instruct", - "knowledge": "2024-10", - "last_updated": "2024-11-11", - "limit": { - "context": 32768, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen2.5 Coder 32B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2024-11-11", - "temperature": true, - "tool_call": false - }, - "qwen/qwen2.5-vl-32b-instruct:free": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen2.5-vl-32b-instruct:free", - "knowledge": "2025-03", - "last_updated": "2025-03-24", - "limit": { - "context": 8192, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image", - "video" - ], - "output": [ - "text" - ] - }, - "name": "Qwen2.5 VL 32B Instruct (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-03-24", - "temperature": true, - "tool_call": true - }, - "qwen/qwen2.5-vl-72b-instruct": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen2.5-vl-72b-instruct", - "knowledge": "2024-10", - "last_updated": "2025-02-01", - "limit": { - "context": 32768, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Qwen2.5 VL 72B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-02-01", - "temperature": true, - "tool_call": false - }, - "qwen/qwen2.5-vl-72b-instruct:free": { - "attachment": true, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen2.5-vl-72b-instruct:free", - "knowledge": "2025-02", - "last_updated": "2025-02-01", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Qwen2.5 VL 72B Instruct (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-02-01", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-14b:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-14b:free", - "knowledge": "2025-04", - "last_updated": "2025-04-28", - "limit": { - "context": 40960, - "output": 40960 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 14B (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-04-28", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-235b-a22b-07-25": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0.85 - }, - "id": "qwen/qwen3-235b-a22b-07-25", - "knowledge": "2025-04", - "last_updated": "2025-07-21", - "limit": { - "context": 262144, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 235B A22B Instruct 2507", - "open_weights": true, - "reasoning": false, - "release_date": "2025-04-28", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-235b-a22b-07-25:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-235b-a22b-07-25:free", - "knowledge": "2025-04", - "last_updated": "2025-07-21", - "limit": { - "context": 262144, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 235B A22B Instruct 2507 (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-04-28", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-235b-a22b-thinking-2507": { - "attachment": false, - "cost": { - "input": 0.078, - "output": 0.312 - }, - "id": "qwen/qwen3-235b-a22b-thinking-2507", - "knowledge": "2025-04", - "last_updated": "2025-07-25", - "limit": { - "context": 262144, - "output": 81920 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 235B A22B Thinking 2507", - "open_weights": true, - "reasoning": true, - "release_date": "2025-07-25", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-235b-a22b:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-235b-a22b:free", - "knowledge": "2025-04", - "last_updated": "2025-04-28", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 235B A22B (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-04-28", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-30b-a3b-instruct-2507": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.8 - }, - "id": "qwen/qwen3-30b-a3b-instruct-2507", - "knowledge": "2025-04", - "last_updated": "2025-07-29", - "limit": { - "context": 262000, - "output": 262000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 30B A3B Instruct 2507", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-29", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-30b-a3b-thinking-2507": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 0.8 - }, - "id": "qwen/qwen3-30b-a3b-thinking-2507", - "knowledge": "2025-04", - "last_updated": "2025-07-29", - "limit": { - "context": 262000, - "output": 262000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 30B A3B Thinking 2507", - "open_weights": true, - "reasoning": true, - "release_date": "2025-07-29", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-30b-a3b:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-30b-a3b:free", - "knowledge": "2025-04", - "last_updated": "2025-04-28", - "limit": { - "context": 40960, - "output": 40960 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 30B A3B (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-04-28", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-32b:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-32b:free", - "knowledge": "2025-04", - "last_updated": "2025-04-28", - "limit": { - "context": 40960, - "output": 40960 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 32B (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-04-28", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-8b:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-8b:free", - "knowledge": "2025-04", - "last_updated": "2025-04-28", - "limit": { - "context": 40960, - "output": 40960 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 8B (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-04-28", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-coder": { - "attachment": false, - "cost": { - "input": 0.3, - "output": 1.2 - }, - "id": "qwen/qwen3-coder", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 262144, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-coder:exacto": { - "attachment": false, - "cost": { - "input": 0.38, - "output": 1.53 - }, - "id": "qwen/qwen3-coder:exacto", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder (exacto)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-coder:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwen3-coder:free", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 262144, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 480B A35B Instruct (free)", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-max": { - "attachment": false, - "cost": { - "input": 1.2, - "output": 6 - }, - "id": "qwen/qwen3-max", - "last_updated": "2025-09-05", - "limit": { - "context": 262144, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Max", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-05", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-next-80b-a3b-instruct": { - "attachment": false, - "cost": { - "input": 0.14, - "output": 1.4 - }, - "id": "qwen/qwen3-next-80b-a3b-instruct", - "knowledge": "2025-04", - "last_updated": "2025-09-11", - "limit": { - "context": 262144, - "output": 262144 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Next 80B A3B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-09-11", - "temperature": true, - "tool_call": true - }, - "qwen/qwen3-next-80b-a3b-thinking": { - "attachment": false, - "cost": { - "input": 0.14, - "output": 1.4 - }, - "id": "qwen/qwen3-next-80b-a3b-thinking", - "knowledge": "2025-04", - "last_updated": "2025-09-11", - "limit": { - "context": 262144, - "output": 262144 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Next 80B A3B Thinking", - "open_weights": true, - "reasoning": true, - "release_date": "2025-09-11", - "temperature": true, - "tool_call": true - }, - "qwen/qwq-32b:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "qwen/qwq-32b:free", - "knowledge": "2025-03", - "last_updated": "2025-03-05", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "QwQ 32B (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-03-05", - "temperature": true, - "tool_call": true - }, - "rekaai/reka-flash-3": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "rekaai/reka-flash-3", - "knowledge": "2024-10", - "last_updated": "2025-03-12", - "limit": { - "context": 32768, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Reka Flash 3", - "open_weights": true, - "reasoning": true, - "release_date": "2025-03-12", - "temperature": true, - "tool_call": true - }, - "sarvamai/sarvam-m:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "sarvamai/sarvam-m:free", - "knowledge": "2025-05", - "last_updated": "2025-05-25", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Sarvam-M (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-05-25", - "temperature": true, - "tool_call": true - }, - "thudm/glm-z1-32b:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "thudm/glm-z1-32b:free", - "knowledge": "2025-04", - "last_updated": "2025-04-17", - "limit": { - "context": 32768, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM Z1 32B (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-04-17", - "temperature": true, - "tool_call": true - }, - "tngtech/deepseek-r1t2-chimera:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "tngtech/deepseek-r1t2-chimera:free", - "knowledge": "2025-07", - "last_updated": "2025-07-08", - "limit": { - "context": 163840, - "output": 163840 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek R1T2 Chimera (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-07-08", - "temperature": true, - "tool_call": false - }, - "x-ai/grok-3": { - "attachment": false, - "cost": { - "cache_read": 0.75, - "cache_write": 15, - "input": 3, - "output": 15 - }, - "id": "x-ai/grok-3", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3", - "open_weights": false, - "reasoning": false, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "x-ai/grok-3-beta": { - "attachment": false, - "cost": { - "cache_read": 0.75, - "cache_write": 15, - "input": 3, - "output": 15 - }, - "id": "x-ai/grok-3-beta", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3 Beta", - "open_weights": false, - "reasoning": false, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "x-ai/grok-3-mini": { - "attachment": false, - "cost": { - "cache_read": 0.075, - "cache_write": 0.5, - "input": 0.3, - "output": 0.5 - }, - "id": "x-ai/grok-3-mini", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3 Mini", - "open_weights": false, - "reasoning": true, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "x-ai/grok-3-mini-beta": { - "attachment": false, - "cost": { - "cache_read": 0.075, - "cache_write": 0.5, - "input": 0.3, - "output": 0.5 - }, - "id": "x-ai/grok-3-mini-beta", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3 Mini Beta", - "open_weights": false, - "reasoning": true, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "x-ai/grok-4": { - "attachment": false, - "cost": { - "cache_read": 0.75, - "cache_write": 15, - "input": 3, - "output": 15 - }, - "id": "x-ai/grok-4", - "knowledge": "2025-07", - "last_updated": "2025-07-09", - "limit": { - "context": 256000, - "output": 64000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 4", - "open_weights": false, - "reasoning": true, - "release_date": "2025-07-09", - "temperature": true, - "tool_call": true - }, - "x-ai/grok-4-fast": { - "attachment": false, - "cost": { - "cache_read": 0.05, - "cache_write": 0.05, - "input": 0.2, - "output": 0.5 - }, - "id": "x-ai/grok-4-fast", - "knowledge": "2024-11", - "last_updated": "2025-08-19", - "limit": { - "context": 2000000, - "output": 30000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Grok 4 Fast", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-19", - "temperature": true, - "tool_call": true - }, - "x-ai/grok-code-fast-1": { - "attachment": false, - "cost": { - "cache_read": 0.02, - "input": 0.2, - "output": 1.5 - }, - "id": "x-ai/grok-code-fast-1", - "knowledge": "2025-08", - "last_updated": "2025-08-26", - "limit": { - "context": 256000, - "output": 10000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok Code Fast 1", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-26", - "temperature": true, - "tool_call": true - }, - "z-ai/glm-4.5": { - "attachment": false, - "cost": { - "input": 0.6, - "output": 2.2 - }, - "id": "z-ai/glm-4.5", - "knowledge": "2025-04", - "last_updated": "2025-07-28", - "limit": { - "context": 128000, - "output": 96000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.5", - "open_weights": true, - "reasoning": true, - "release_date": "2025-07-28", - "temperature": true, - "tool_call": true - }, - "z-ai/glm-4.5-air": { - "attachment": false, - "cost": { - "input": 0.2, - "output": 1.1 - }, - "id": "z-ai/glm-4.5-air", - "knowledge": "2025-04", - "last_updated": "2025-07-28", - "limit": { - "context": 128000, - "output": 96000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.5 Air", - "open_weights": true, - "reasoning": true, - "release_date": "2025-07-28", - "temperature": true, - "tool_call": true - }, - "z-ai/glm-4.5-air:free": { - "attachment": false, - "cost": { - "input": 0, - "output": 0 - }, - "id": "z-ai/glm-4.5-air:free", - "knowledge": "2025-04", - "last_updated": "2025-07-28", - "limit": { - "context": 128000, - "output": 96000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.5 Air (free)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-07-28", - "temperature": true, - "tool_call": false - }, - "z-ai/glm-4.5v": { - "attachment": true, - "cost": { - "input": 0.6, - "output": 1.8 - }, - "id": "z-ai/glm-4.5v", - "knowledge": "2025-04", - "last_updated": "2025-08-11", - "limit": { - "context": 64000, - "output": 16384 - }, - "modalities": { - "input": [ - "text", - "image", - "video" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.5V", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-11", - "temperature": true, - "tool_call": true - }, - "z-ai/glm-4.6": { - "attachment": false, - "cost": { - "cache_read": 0.11, - "input": 0.6, - "output": 2.2 - }, - "id": "z-ai/glm-4.6", - "knowledge": "2025-09", - "last_updated": "2025-09-30", - "limit": { - "context": 200000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.6", - "open_weights": true, - "reasoning": true, - "release_date": "2025-09-30", - "temperature": true, - "tool_call": true - }, - "z-ai/glm-4.6:exacto": { - "attachment": false, - "cost": { - "cache_read": 0.11, - "input": 0.6, - "output": 1.9 - }, - "id": "z-ai/glm-4.6:exacto", - "knowledge": "2025-09", - "last_updated": "2025-09-30", - "limit": { - "context": 200000, - "output": 128000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GLM 4.6 (exacto)", - "open_weights": true, - "reasoning": true, - "release_date": "2025-09-30", - "temperature": true, - "tool_call": true - } - }, - "name": "OpenRouter", - "npm": "@ai-sdk/openai-compatible" - }, - "perplexity": { - "doc": "https://docs.perplexity.ai", - "env": [ - "PERPLEXITY_API_KEY" - ], - "id": "perplexity", - "models": { - "sonar": { - "attachment": false, - "cost": { - "input": 1, - "output": 1 - }, - "id": "sonar", - "knowledge": "2025-09-01", - "last_updated": "2025-09-01", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Sonar", - "open_weights": false, - "reasoning": false, - "release_date": "2024-01-01", - "temperature": true, - "tool_call": false - }, - "sonar-pro": { - "attachment": true, - "cost": { - "input": 3, - "output": 15 - }, - "id": "sonar-pro", - "knowledge": "2025-09-01", - "last_updated": "2025-09-01", - "limit": { - "context": 200000, - "output": 8192 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Sonar Pro", - "open_weights": false, - "reasoning": false, - "release_date": "2024-01-01", - "temperature": true, - "tool_call": false - }, - "sonar-reasoning": { - "attachment": false, - "cost": { - "input": 1, - "output": 5 - }, - "id": "sonar-reasoning", - "knowledge": "2025-09-01", - "last_updated": "2025-09-01", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Sonar Reasoning", - "open_weights": false, - "reasoning": true, - "release_date": "2024-01-01", - "temperature": true, - "tool_call": false - }, - "sonar-reasoning-pro": { - "attachment": true, - "cost": { - "input": 2, - "output": 8 - }, - "id": "sonar-reasoning-pro", - "knowledge": "2025-09-01", - "last_updated": "2025-09-01", - "limit": { - "context": 128000, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Sonar Reasoning Pro", - "open_weights": false, - "reasoning": true, - "release_date": "2024-01-01", - "temperature": true, - "tool_call": false - } - }, - "name": "Perplexity", - "npm": "@perplexity-ai/perplexity_ai" - }, - "togetherai": { - "doc": "https://docs.together.ai/docs/serverless-models", - "env": [ - "TOGETHER_API_KEY" - ], - "id": "togetherai", - "models": { - "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": { - "attachment": false, - "cost": { - "input": 2, - "output": 2 - }, - "id": "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8", - "knowledge": "2025-04", - "last_updated": "2025-07-23", - "limit": { - "context": 262144, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Qwen3 Coder 480B A35B Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-23", - "temperature": true, - "tool_call": true - }, - "deepseek-ai/DeepSeek-R1": { - "attachment": false, - "cost": { - "input": 3, - "output": 7 - }, - "id": "deepseek-ai/DeepSeek-R1", - "knowledge": "2024-07", - "last_updated": "2025-03-24", - "limit": { - "context": 163839, - "output": 12288 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek R1", - "open_weights": true, - "reasoning": true, - "release_date": "2024-12-26", - "temperature": true, - "tool_call": false - }, - "deepseek-ai/DeepSeek-V3": { - "attachment": false, - "cost": { - "input": 1.25, - "output": 1.25 - }, - "id": "deepseek-ai/DeepSeek-V3", - "knowledge": "2024-07", - "last_updated": "2025-05-29", - "limit": { - "context": 131072, - "output": 12288 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "DeepSeek V3", - "open_weights": true, - "reasoning": true, - "release_date": "2025-01-20", - "temperature": true, - "tool_call": true - }, - "meta-llama/Llama-3.3-70B-Instruct-Turbo": { - "attachment": false, - "cost": { - "input": 0.88, - "output": 0.88 - }, - "id": "meta-llama/Llama-3.3-70B-Instruct-Turbo", - "knowledge": "2023-12", - "last_updated": "2024-12-06", - "limit": { - "context": 131072, - "output": 66536 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Llama 3.3 70B", - "open_weights": true, - "reasoning": false, - "release_date": "2024-12-06", - "temperature": true, - "tool_call": true - }, - "moonshotai/Kimi-K2-Instruct": { - "attachment": false, - "cost": { - "input": 1, - "output": 3 - }, - "id": "moonshotai/Kimi-K2-Instruct", - "knowledge": "2024-10", - "last_updated": "2025-07-14", - "limit": { - "context": 131072, - "output": 32768 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Kimi K2 Instruct", - "open_weights": true, - "reasoning": false, - "release_date": "2025-07-14", - "temperature": true, - "tool_call": true - }, - "openai/gpt-oss-120b": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0.6 - }, - "id": "openai/gpt-oss-120b", - "last_updated": "2025-08-05", - "limit": { - "context": 131072, - "output": 131072 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "GPT OSS 120B", - "open_weights": true, - "reasoning": true, - "release_date": "2025-08-05", - "temperature": true, - "tool_call": true - } - }, - "name": "Together AI", - "npm": "@ai-sdk/togetherai" - }, - "upstage": { - "api": "https://api.upstage.ai", - "doc": "https://developers.upstage.ai/docs/apis/chat", - "env": [ - "UPSTAGE_API_KEY" - ], - "id": "upstage", - "models": { - "solar-mini": { - "attachment": false, - "cost": { - "input": 0.15, - "output": 0.15 - }, - "id": "solar-mini", - "knowledge": "2024-09", - "last_updated": "2025-04-22", - "limit": { - "context": 32768, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "solar-mini", - "open_weights": false, - "reasoning": false, - "release_date": "2024-06-12", - "temperature": true, - "tool_call": true - }, - "solar-pro2": { - "attachment": false, - "cost": { - "input": 0.25, - "output": 0.25 - }, - "id": "solar-pro2", - "knowledge": "2025-03", - "last_updated": "2025-05-20", - "limit": { - "context": 65536, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "solar-pro2", - "open_weights": false, - "reasoning": true, - "release_date": "2025-05-20", - "temperature": true, - "tool_call": true - } - }, - "name": "Upstage", - "npm": "@ai-sdk/openai-compatible" - }, - "xai": { - "doc": "https://docs.x.ai/docs/models", - "env": [ - "XAI_API_KEY" - ], - "id": "xai", - "models": { - "grok-2": { - "attachment": false, - "cost": { - "cache_read": 2, - "input": 2, - "output": 10 - }, - "id": "grok-2", - "knowledge": "2024-08", - "last_updated": "2024-08-20", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 2", - "open_weights": false, - "reasoning": false, - "release_date": "2024-08-20", - "temperature": true, - "tool_call": true - }, - "grok-2-1212": { - "attachment": false, - "cost": { - "cache_read": 2, - "input": 2, - "output": 10 - }, - "id": "grok-2-1212", - "knowledge": "2024-08", - "last_updated": "2024-12-12", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 2 (1212)", - "open_weights": false, - "reasoning": false, - "release_date": "2024-12-12", - "temperature": true, - "tool_call": true - }, - "grok-2-latest": { - "attachment": false, - "cost": { - "cache_read": 2, - "input": 2, - "output": 10 - }, - "id": "grok-2-latest", - "knowledge": "2024-08", - "last_updated": "2024-12-12", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 2 Latest", - "open_weights": false, - "reasoning": false, - "release_date": "2024-08-20", - "temperature": true, - "tool_call": true - }, - "grok-2-vision": { - "attachment": true, - "cost": { - "cache_read": 2, - "input": 2, - "output": 10 - }, - "id": "grok-2-vision", - "knowledge": "2024-08", - "last_updated": "2024-08-20", - "limit": { - "context": 8192, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Grok 2 Vision", - "open_weights": false, - "reasoning": false, - "release_date": "2024-08-20", - "temperature": true, - "tool_call": true - }, - "grok-2-vision-1212": { - "attachment": true, - "cost": { - "cache_read": 2, - "input": 2, - "output": 10 - }, - "id": "grok-2-vision-1212", - "knowledge": "2024-08", - "last_updated": "2024-12-12", - "limit": { - "context": 8192, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Grok 2 Vision (1212)", - "open_weights": false, - "reasoning": false, - "release_date": "2024-08-20", - "temperature": true, - "tool_call": true - }, - "grok-2-vision-latest": { - "attachment": true, - "cost": { - "cache_read": 2, - "input": 2, - "output": 10 - }, - "id": "grok-2-vision-latest", - "knowledge": "2024-08", - "last_updated": "2024-12-12", - "limit": { - "context": 8192, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Grok 2 Vision Latest", - "open_weights": false, - "reasoning": false, - "release_date": "2024-08-20", - "temperature": true, - "tool_call": true - }, - "grok-3": { - "attachment": false, - "cost": { - "cache_read": 0.75, - "input": 3, - "output": 15 - }, - "id": "grok-3", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3", - "open_weights": false, - "reasoning": false, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "grok-3-fast": { - "attachment": false, - "cost": { - "cache_read": 1.25, - "input": 5, - "output": 25 - }, - "id": "grok-3-fast", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3 Fast", - "open_weights": false, - "reasoning": false, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "grok-3-fast-latest": { - "attachment": false, - "cost": { - "cache_read": 1.25, - "input": 5, - "output": 25 - }, - "id": "grok-3-fast-latest", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3 Fast Latest", - "open_weights": false, - "reasoning": false, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "grok-3-latest": { - "attachment": false, - "cost": { - "cache_read": 0.75, - "input": 3, - "output": 15 - }, - "id": "grok-3-latest", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3 Latest", - "open_weights": false, - "reasoning": false, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "grok-3-mini": { - "attachment": false, - "cost": { - "cache_read": 0.075, - "input": 0.3, - "output": 0.5, - "reasoning": 0.5 - }, - "id": "grok-3-mini", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3 Mini", - "open_weights": false, - "reasoning": true, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "grok-3-mini-fast": { - "attachment": false, - "cost": { - "cache_read": 0.15, - "input": 0.6, - "output": 4, - "reasoning": 4 - }, - "id": "grok-3-mini-fast", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3 Mini Fast", - "open_weights": false, - "reasoning": true, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "grok-3-mini-fast-latest": { - "attachment": false, - "cost": { - "cache_read": 0.15, - "input": 0.6, - "output": 4, - "reasoning": 4 - }, - "id": "grok-3-mini-fast-latest", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3 Mini Fast Latest", - "open_weights": false, - "reasoning": true, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "grok-3-mini-latest": { - "attachment": false, - "cost": { - "cache_read": 0.075, - "input": 0.3, - "output": 0.5, - "reasoning": 0.5 - }, - "id": "grok-3-mini-latest", - "knowledge": "2024-11", - "last_updated": "2025-02-17", - "limit": { - "context": 131072, - "output": 8192 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 3 Mini Latest", - "open_weights": false, - "reasoning": true, - "release_date": "2025-02-17", - "temperature": true, - "tool_call": true - }, - "grok-4": { - "attachment": false, - "cost": { - "cache_read": 0.75, - "input": 3, - "output": 15, - "reasoning": 15 - }, - "id": "grok-4", - "knowledge": "2025-07", - "last_updated": "2025-07-09", - "limit": { - "context": 256000, - "output": 64000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok 4", - "open_weights": false, - "reasoning": true, - "release_date": "2025-07-09", - "temperature": true, - "tool_call": true - }, - "grok-4-fast": { - "attachment": true, - "cost": { - "cache_read": 0.05, - "input": 0.2, - "output": 0.5 - }, - "id": "grok-4-fast", - "knowledge": "2025-07", - "last_updated": "2025-09-19", - "limit": { - "context": 2000000, - "output": 30000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Grok 4 Fast", - "open_weights": false, - "reasoning": true, - "release_date": "2025-09-19", - "temperature": true, - "tool_call": true - }, - "grok-4-fast-non-reasoning": { - "attachment": true, - "cost": { - "cache_read": 0.05, - "input": 0.2, - "output": 0.5 - }, - "id": "grok-4-fast-non-reasoning", - "knowledge": "2025-07", - "last_updated": "2025-09-19", - "limit": { - "context": 2000000, - "output": 30000 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Grok 4 Fast (Non-Reasoning)", - "open_weights": false, - "reasoning": false, - "release_date": "2025-09-19", - "temperature": true, - "tool_call": true - }, - "grok-beta": { - "attachment": false, - "cost": { - "cache_read": 5, - "input": 5, - "output": 15 - }, - "id": "grok-beta", - "knowledge": "2024-08", - "last_updated": "2024-11-01", - "limit": { - "context": 131072, - "output": 4096 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok Beta", - "open_weights": false, - "reasoning": false, - "release_date": "2024-11-01", - "temperature": true, - "tool_call": true - }, - "grok-code-fast-1": { - "attachment": false, - "cost": { - "cache_read": 0.02, - "input": 0.2, - "output": 1.5 - }, - "id": "grok-code-fast-1", - "knowledge": "2023-10", - "last_updated": "2025-08-28", - "limit": { - "context": 256000, - "output": 10000 - }, - "modalities": { - "input": [ - "text" - ], - "output": [ - "text" - ] - }, - "name": "Grok Code Fast 1", - "open_weights": false, - "reasoning": true, - "release_date": "2025-08-28", - "temperature": true, - "tool_call": true - }, - "grok-vision-beta": { - "attachment": true, - "cost": { - "cache_read": 5, - "input": 5, - "output": 15 - }, - "id": "grok-vision-beta", - "knowledge": "2024-08", - "last_updated": "2024-11-01", - "limit": { - "context": 8192, - "output": 4096 - }, - "modalities": { - "input": [ - "text", - "image" - ], - "output": [ - "text" - ] - }, - "name": "Grok Vision Beta", - "open_weights": false, - "reasoning": false, - "release_date": "2024-11-01", - "temperature": true, - "tool_call": true - } - }, - "name": "xAI", - "npm": "@ai-sdk/xai" - } -} \ No newline at end of file diff --git a/libs/model-profiles/pyproject.toml b/libs/model-profiles/pyproject.toml index e68aba867594d..8cc3cee1597f4 100644 --- a/libs/model-profiles/pyproject.toml +++ b/libs/model-profiles/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "langchain-model-profiles" -description = "Centralized reference of LLM capabilities." +description = "CLI tool for updating model profile data in LangChain integration packages." readme = "README.md" license = { text = "MIT" } authors = [] @@ -12,10 +12,14 @@ authors = [] version = "0.0.4" requires-python = ">=3.10.0,<4.0.0" dependencies = [ + "httpx>=0.23.0,<1", "tomli>=2.0.0,<3.0.0; python_version < '3.11'", "typing-extensions>=4.7.0,<5.0.0", ] +[project.scripts] +langchain-profiles = "langchain_model_profiles.cli:main" + [project.urls] Homepage = "https://docs.langchain.com/" Documentation = "https://reference.langchain.com/python/langchain_model_profiles/" @@ -25,9 +29,7 @@ Slack = "https://www.langchain.com/join-community" Reddit = "https://www.reddit.com/r/LangChain/" [dependency-groups] -dev = [ - "httpx>=0.23.0,<1", # For refresh_data.py script -] +dev = [] test = [ "pytest>=8.0.0,<9.0.0", diff --git a/libs/model-profiles/scripts/refresh_data.py b/libs/model-profiles/scripts/refresh_data.py deleted file mode 100755 index 53af341c07c14..0000000000000 --- a/libs/model-profiles/scripts/refresh_data.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python3 -"""Refresh model profile data from models.dev. - -Update the bundled model data by running: - python scripts/refresh_data.py -""" - -import json -from pathlib import Path - -import httpx - -PROVIDER_SUBSET = [ - # This is done to limit the data size - "amazon-bedrock", - "anthropic", - "azure", - "baseten", - "cerebras", - "cloudflare-workers-ai", - "deepinfra", - "deepseek", - "fireworks-ai", - "google", - "google-vertex", - "google-vertex-anthropic", - "groq", - "huggingface", - "lmstudio", - "mistral", - "nebius", - "nvidia", - "openai", - "openrouter", - "perplexity", - "togetherai", - "upstage", - "xai", -] - - -def main() -> None: - """Download and save the latest model data from models.dev.""" - api_url = "https://models.dev/api.json" - output_dir = Path(__file__).parent.parent / "langchain_model_profiles" / "data" - output_file = output_dir / "models.json" - - print(f"Downloading data from {api_url}...") # noqa: T201 - response = httpx.get(api_url, timeout=30) - response.raise_for_status() - - data = response.json() - - # Basic validation - if not isinstance(data, dict): - msg = "Expected API response to be a dictionary" - raise TypeError(msg) - - provider_count = len(data) - model_count = sum(len(provider.get("models", {})) for provider in data.values()) - - print(f"Downloaded {provider_count} providers with {model_count} models") # noqa: T201 - - # Subset providers - data = {k: v for k, v in data.items() if k in PROVIDER_SUBSET} - print(f"Filtered to {len(data)} providers based on subset") # noqa: T201 - - # Ensure directory exists - output_dir.mkdir(parents=True, exist_ok=True) - - # Write with pretty formatting for readability - print(f"Writing to {output_file}...") # noqa: T201 - with output_file.open("w") as f: - json.dump(data, f, indent=2, sort_keys=True) - - print(f"✓ Successfully refreshed model data ({output_file.stat().st_size:,} bytes)") # noqa: T201 - - -if __name__ == "__main__": - main() diff --git a/libs/model-profiles/tests/unit_tests/test_chat_model.py b/libs/model-profiles/tests/unit_tests/test_chat_model.py deleted file mode 100644 index a32e52c012285..0000000000000 --- a/libs/model-profiles/tests/unit_tests/test_chat_model.py +++ /dev/null @@ -1,18 +0,0 @@ -"""End to end test for fetching model profiles from a chat model.""" - -from langchain.chat_models import init_chat_model - - -def test_chat_model() -> None: - """Test that chat model gets profile data correctly.""" - model = init_chat_model("openai:gpt-5", api_key="foo") - assert model.profile - assert model.profile["max_input_tokens"] == 400000 - assert model.profile["structured_output"] - assert model.profile["pdf_inputs"] - - -def test_chat_model_no_data() -> None: - """Test that chat model handles missing profile data.""" - model = init_chat_model("openai:gpt-fake", api_key="foo") - assert model.profile == {} diff --git a/libs/model-profiles/tests/unit_tests/test_cli.py b/libs/model-profiles/tests/unit_tests/test_cli.py new file mode 100644 index 0000000000000..5d99c16e2757f --- /dev/null +++ b/libs/model-profiles/tests/unit_tests/test_cli.py @@ -0,0 +1,124 @@ +"""Tests for CLI functionality.""" + +import json +from pathlib import Path +from unittest.mock import Mock, patch + +import pytest + +from langchain_model_profiles.cli import refresh + + +@pytest.fixture +def mock_models_dev_response() -> dict: + """Create a mock response from models.dev API.""" + return { + "anthropic": { + "id": "anthropic", + "name": "Anthropic", + "models": { + "claude-3-opus": { + "id": "claude-3-opus", + "name": "Claude 3 Opus", + "tool_call": True, + "limit": {"context": 200000, "output": 4096}, + "modalities": {"input": ["text", "image"], "output": ["text"]}, + }, + "claude-3-sonnet": { + "id": "claude-3-sonnet", + "name": "Claude 3 Sonnet", + "tool_call": True, + "limit": {"context": 200000, "output": 4096}, + "modalities": {"input": ["text", "image"], "output": ["text"]}, + }, + }, + }, + "openai": { + "id": "openai", + "name": "OpenAI", + "models": { + "gpt-4": { + "id": "gpt-4", + "name": "GPT-4", + "tool_call": True, + "limit": {"context": 8192, "output": 4096}, + "modalities": {"input": ["text"], "output": ["text"]}, + } + }, + }, + } + + +def test_refresh_downloads_and_saves_provider_data( + tmp_path: Path, mock_models_dev_response: dict +) -> None: + """Test that refresh command downloads and saves provider-specific data.""" + output_file = tmp_path / "data" / "models.json" + + # Mock the httpx.get call + mock_response = Mock() + mock_response.json.return_value = mock_models_dev_response + mock_response.raise_for_status = Mock() + + with patch("langchain_model_profiles.cli.httpx.get", return_value=mock_response): + refresh("anthropic", output_file) + + # Verify output file was created + assert output_file.exists() + + # Verify content is correct + with output_file.open() as f: + saved_data = json.load(f) + + # Should only contain anthropic data + assert len(saved_data) == 1 + assert "anthropic" in saved_data + assert "openai" not in saved_data + + # Verify anthropic data is complete + anthropic_data = saved_data["anthropic"] + assert anthropic_data["id"] == "anthropic" + assert anthropic_data["name"] == "Anthropic" + assert len(anthropic_data["models"]) == 2 + assert "claude-3-opus" in anthropic_data["models"] + assert "claude-3-sonnet" in anthropic_data["models"] + + +def test_refresh_raises_error_for_missing_provider( + tmp_path: Path, mock_models_dev_response: dict +) -> None: + """Test that refresh exits with error for non-existent provider.""" + output_file = tmp_path / "models.json" + + # Mock the httpx.get call + mock_response = Mock() + mock_response.json.return_value = mock_models_dev_response + mock_response.raise_for_status = Mock() + + with patch("langchain_model_profiles.cli.httpx.get", return_value=mock_response): + with pytest.raises(SystemExit) as exc_info: + refresh("nonexistent-provider", output_file) + + assert exc_info.value.code == 1 + + # Output file should not be created + assert not output_file.exists() + + +def test_refresh_creates_parent_directories( + tmp_path: Path, mock_models_dev_response: dict +) -> None: + """Test that refresh creates parent directories if they don't exist.""" + output_file = tmp_path / "nested" / "dir" / "models.json" + + # Mock the httpx.get call + mock_response = Mock() + mock_response.json.return_value = mock_models_dev_response + mock_response.raise_for_status = Mock() + + with patch("langchain_model_profiles.cli.httpx.get", return_value=mock_response): + refresh("anthropic", output_file) + + # Verify parent directories were created + assert output_file.parent.exists() + assert output_file.exists() diff --git a/libs/model-profiles/tests/unit_tests/test_data_loader.py b/libs/model-profiles/tests/unit_tests/test_data_loader.py deleted file mode 100644 index ebe5d003f466d..0000000000000 --- a/libs/model-profiles/tests/unit_tests/test_data_loader.py +++ /dev/null @@ -1,142 +0,0 @@ -"""Tests for data loader with augmentation support.""" - -import json -from pathlib import Path - -import pytest - -from langchain_model_profiles._data_loader import _DataLoader - - -@pytest.fixture -def temp_data_dir(tmp_path: Path) -> Path: - """Create a temporary data directory structure.""" - data_dir = tmp_path / "data" - data_dir.mkdir() - - # Create base models.json - base_data = { - "test-provider": { - "id": "test-provider", - "models": { - "test-model": { - "id": "test-model", - "name": "Test Model", - "tool_call": True, - "limit": {"context": 8000, "output": 4000}, - "modalities": {"input": ["text"], "output": ["text"]}, - } - }, - } - } - - with (data_dir / "models.json").open("w") as f: - json.dump(base_data, f) - - # Create augmentations directories - aug_dir = data_dir / "augmentations" - (aug_dir / "providers").mkdir(parents=True) - (aug_dir / "models" / "test-provider").mkdir(parents=True) - - return data_dir - - -def test_load_base_data_only(temp_data_dir: Path) -> None: - """Test loading base data without augmentations.""" - loader = _DataLoader() - # Patch before any property access - loader._data_dir = temp_data_dir - result = loader.get_profile_data("test-provider", "test-model") - - assert result is not None - assert result["id"] == "test-model" - assert result["name"] == "Test Model" - assert result["tool_call"] is True - - -def test_provider_level_augmentation(temp_data_dir: Path) -> None: - """Test provider-level augmentations are applied.""" - # Add provider augmentation - provider_toml = temp_data_dir / "augmentations" / "providers" / "test-provider.toml" - provider_toml.write_text(""" -[profile] -image_url_inputs = true -pdf_inputs = true -""") - - loader = _DataLoader() - loader._data_dir = temp_data_dir - result = loader.get_profile_data("test-provider", "test-model") - - assert result is not None - assert result["image_url_inputs"] is True - assert result["pdf_inputs"] is True - # Base data should still be present - assert result["tool_call"] is True - - -def test_model_level_augmentation_overrides_provider(temp_data_dir: Path) -> None: - """Test model-level augmentations override provider augmentations.""" - # Add provider augmentation - provider_toml = temp_data_dir / "augmentations" / "providers" / "test-provider.toml" - provider_toml.write_text(""" -[profile] -image_url_inputs = true -pdf_inputs = false -""") - - # Add model augmentation that overrides - model_toml = ( - temp_data_dir / "augmentations" / "models" / "test-provider" / "test-model.toml" - ) - model_toml.write_text(""" -[profile] -pdf_inputs = true -reasoning_output = true -""") - - loader = _DataLoader() - loader._data_dir = temp_data_dir - result = loader.get_profile_data("test-provider", "test-model") - - assert result is not None - # From provider - assert result["image_url_inputs"] is True - # Overridden by model - assert result["pdf_inputs"] is True - # From model only - assert result["reasoning_output"] is True - # From base - assert result["tool_call"] is True - - -def test_missing_provider(temp_data_dir: Path) -> None: - """Test returns None for missing provider.""" - loader = _DataLoader() - loader._data_dir = temp_data_dir - result = loader.get_profile_data("nonexistent-provider", "test-model") - - assert result is None - - -def test_missing_model(temp_data_dir: Path) -> None: - """Test returns None for missing model.""" - loader = _DataLoader() - loader._data_dir = temp_data_dir - result = loader.get_profile_data("test-provider", "nonexistent-model") - - assert result is None - - -def test_merged_data_is_cached(temp_data_dir: Path) -> None: - """Test that merged data is cached after first access.""" - loader = _DataLoader() - loader._data_dir = temp_data_dir - # First access - result1 = loader.get_profile_data("test-provider", "test-model") - # Second access should use cached data - result2 = loader.get_profile_data("test-provider", "test-model") - - assert result1 == result2 - # Verify it's using the cached property by checking _merged_data was accessed - assert hasattr(loader, "_merged_data") diff --git a/libs/model-profiles/tests/unit_tests/test_model_profile.py b/libs/model-profiles/tests/unit_tests/test_model_profile.py deleted file mode 100644 index 44c40c640a931..0000000000000 --- a/libs/model-profiles/tests/unit_tests/test_model_profile.py +++ /dev/null @@ -1,31 +0,0 @@ -"""Test provider and model ID mappings.""" - -import pytest - -from langchain_model_profiles.model_profile import get_model_profile - - -@pytest.mark.parametrize( - ("provider", "model_id"), - [ - ("openai-chat", "gpt-5"), - ("azure-openai-chat", "gpt-5"), - ("anthropic-chat", "claude-sonnet-4-5"), - ("vertexai", "models/gemini-2.0-flash-001"), - ("chat-google-generative-ai", "models/gemini-2.0-flash-001"), - ("amazon_bedrock_chat", "anthropic.claude-sonnet-4-20250514-v1:0"), - ("amazon_bedrock_converse_chat", "anthropic.claude-sonnet-4-20250514-v1:0"), - # ("chat-ai21", "jamba-mini"), # no data yet # noqa: ERA001 - ("chat-deepseek", "deepseek-reasoner"), - ("fireworks-chat", "accounts/fireworks/models/gpt-oss-20b"), - ("groq-chat", "llama-3.3-70b-versatile"), - ("huggingface-chat-wrapper", "Qwen/Qwen3-235B-A22B-Thinking-2507"), - ("mistralai-chat", "mistral-large-latest"), - # ("chat-ollama", "llama3.1"), # no data yet # noqa: ERA001 - ("perplexitychat", "sonar"), - ("xai-chat", "grok-4"), - ], -) -def test_id_translation(provider: str, model_id: str) -> None: - """Test translation from LangChain to model / provider IDs.""" - assert get_model_profile(provider, model_id) diff --git a/libs/model-profiles/uv.lock b/libs/model-profiles/uv.lock index 5c5c1d96c6073..435cdd13d3bc7 100644 --- a/libs/model-profiles/uv.lock +++ b/libs/model-profiles/uv.lock @@ -486,7 +486,6 @@ requires-dist = [ { name = "langchain-groq", marker = "extra == 'groq'" }, { name = "langchain-huggingface", marker = "extra == 'huggingface'" }, { name = "langchain-mistralai", marker = "extra == 'mistralai'" }, - { name = "langchain-model-profiles", marker = "extra == 'model-profiles'" }, { name = "langchain-ollama", marker = "extra == 'ollama'" }, { name = "langchain-openai", marker = "extra == 'openai'", editable = "../partners/openai" }, { name = "langchain-perplexity", marker = "extra == 'perplexity'" }, @@ -495,7 +494,7 @@ requires-dist = [ { name = "langgraph", specifier = ">=1.0.2,<1.1.0" }, { name = "pydantic", specifier = ">=2.7.4,<3.0.0" }, ] -provides-extras = ["model-profiles", "community", "anthropic", "openai", "azure-ai", "google-vertexai", "google-genai", "fireworks", "ollama", "together", "mistralai", "huggingface", "groq", "aws", "deepseek", "xai", "perplexity"] +provides-extras = ["community", "anthropic", "openai", "azure-ai", "google-vertexai", "google-genai", "fireworks", "ollama", "together", "mistralai", "huggingface", "groq", "aws", "deepseek", "xai", "perplexity"] [package.metadata.requires-dev] lint = [{ name = "ruff", specifier = ">=0.12.2,<0.13.0" }] @@ -528,7 +527,7 @@ typing = [ [[package]] name = "langchain-core" -version = "1.0.4" +version = "1.0.7" source = { editable = "../core" } dependencies = [ { name = "jsonpatch" }, @@ -562,7 +561,6 @@ test = [ { name = "blockbuster", specifier = ">=1.5.18,<1.6.0" }, { name = "freezegun", specifier = ">=1.2.2,<2.0.0" }, { name = "grandalf", specifier = ">=0.8.0,<1.0.0" }, - { name = "langchain-model-profiles", directory = "." }, { name = "langchain-tests", directory = "../standard-tests" }, { name = "numpy", marker = "python_full_version < '3.13'", specifier = ">=1.26.4" }, { name = "numpy", marker = "python_full_version >= '3.13'", specifier = ">=2.1.0" }, @@ -579,7 +577,6 @@ test = [ ] test-integration = [] typing = [ - { name = "langchain-model-profiles", directory = "." }, { name = "langchain-text-splitters", directory = "../text-splitters" }, { name = "mypy", specifier = ">=1.18.1,<1.19.0" }, { name = "types-pyyaml", specifier = ">=6.0.12.2,<7.0.0.0" }, @@ -591,14 +588,12 @@ name = "langchain-model-profiles" version = "0.0.4" source = { editable = "." } dependencies = [ + { name = "httpx" }, { name = "tomli", marker = "python_full_version < '3.11'" }, { name = "typing-extensions" }, ] [package.dev-dependencies] -dev = [ - { name = "httpx" }, -] lint = [ { name = "langchain" }, { name = "ruff" }, @@ -626,12 +621,13 @@ typing = [ [package.metadata] requires-dist = [ + { name = "httpx", specifier = ">=0.23.0,<1" }, { name = "tomli", marker = "python_full_version < '3.11'", specifier = ">=2.0.0,<3.0.0" }, { name = "typing-extensions", specifier = ">=4.7.0,<5.0.0" }, ] [package.metadata.requires-dev] -dev = [{ name = "httpx", specifier = ">=0.23.0,<1" }] +dev = [] lint = [ { name = "langchain", editable = "../langchain_v1" }, { name = "ruff", specifier = ">=0.12.2,<0.13.0" }, @@ -657,7 +653,7 @@ typing = [ [[package]] name = "langchain-openai" -version = "1.0.2" +version = "1.0.3" source = { editable = "../partners/openai" } dependencies = [ { name = "langchain-core" }, diff --git a/libs/partners/anthropic/langchain_anthropic/chat_models.py b/libs/partners/anthropic/langchain_anthropic/chat_models.py index c4fbd15c711cd..d3129884c8411 100644 --- a/libs/partners/anthropic/langchain_anthropic/chat_models.py +++ b/libs/partners/anthropic/langchain_anthropic/chat_models.py @@ -9,6 +9,7 @@ from collections.abc import AsyncIterator, Callable, Iterator, Mapping, Sequence from functools import cached_property from operator import itemgetter +from pathlib import Path from typing import Any, Final, Literal, cast import anthropic @@ -19,6 +20,10 @@ from langchain_core.exceptions import OutputParserException from langchain_core.language_models import LanguageModelInput from langchain_core.language_models.chat_models import BaseChatModel, LangSmithParams +from langchain_core.language_models.profile import ModelProfile, ModelProfileRegistry +from langchain_core.language_models.profile._loader_utils import ( + load_profiles_from_data_dir, +) from langchain_core.messages import ( AIMessage, AIMessageChunk, @@ -50,7 +55,7 @@ from langchain_core.utils.pydantic import is_basemodel_subclass from langchain_core.utils.utils import _build_model_kwargs from pydantic import BaseModel, ConfigDict, Field, SecretStr, model_validator -from typing_extensions import NotRequired, TypedDict +from typing_extensions import NotRequired, Self, TypedDict from langchain_anthropic._client_utils import ( _get_default_async_httpx_client, @@ -66,6 +71,16 @@ "HumanMessageChunk": "user", } +_MODEL_PROFILES = cast( + ModelProfileRegistry, + load_profiles_from_data_dir(Path(__file__).parent / "data", "anthropic"), +) + + +def _get_default_model_profile(model_name: str) -> ModelProfile: + default = _MODEL_PROFILES.get(model_name) or {} + return default.copy() + _MODEL_DEFAULT_MAX_OUTPUT_TOKENS: Final[dict[str, int]] = { # Listed old to new @@ -1610,6 +1625,13 @@ def build_extra(cls, values: dict) -> Any: all_required_field_names = get_pydantic_field_names(cls) return _build_model_kwargs(values, all_required_field_names) + @model_validator(mode="after") + def _set_model_profile(self) -> Self: + """Set model profile if not overridden.""" + if self.profile is None: + self.profile = _get_default_model_profile(self.model) + return self + @cached_property def _client_params(self) -> dict[str, Any]: client_params: dict[str, Any] = { diff --git a/libs/partners/anthropic/langchain_anthropic/data/models.json b/libs/partners/anthropic/langchain_anthropic/data/models.json new file mode 100644 index 0000000000000..2412cb5af4cac --- /dev/null +++ b/libs/partners/anthropic/langchain_anthropic/data/models.json @@ -0,0 +1,602 @@ +{ + "anthropic": { + "doc": "https://docs.anthropic.com/en/docs/about-claude/models", + "env": [ + "ANTHROPIC_API_KEY" + ], + "id": "anthropic", + "models": { + "claude-3-5-haiku-20241022": { + "attachment": true, + "cost": { + "cache_read": 0.08, + "cache_write": 1, + "input": 0.8, + "output": 4 + }, + "id": "claude-3-5-haiku-20241022", + "knowledge": "2024-07-31", + "last_updated": "2024-10-22", + "limit": { + "context": 200000, + "output": 8192 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Haiku 3.5", + "open_weights": false, + "reasoning": false, + "release_date": "2024-10-22", + "temperature": true, + "tool_call": true + }, + "claude-3-5-haiku-latest": { + "attachment": true, + "cost": { + "cache_read": 0.08, + "cache_write": 1, + "input": 0.8, + "output": 4 + }, + "id": "claude-3-5-haiku-latest", + "knowledge": "2024-07-31", + "last_updated": "2024-10-22", + "limit": { + "context": 200000, + "output": 8192 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Haiku 3.5 (latest)", + "open_weights": false, + "reasoning": false, + "release_date": "2024-10-22", + "temperature": true, + "tool_call": true + }, + "claude-3-5-sonnet-20240620": { + "attachment": true, + "cost": { + "cache_read": 0.3, + "cache_write": 3.75, + "input": 3, + "output": 15 + }, + "id": "claude-3-5-sonnet-20240620", + "knowledge": "2024-04-30", + "last_updated": "2024-06-20", + "limit": { + "context": 200000, + "output": 8192 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Sonnet 3.5", + "open_weights": false, + "reasoning": false, + "release_date": "2024-06-20", + "temperature": true, + "tool_call": true + }, + "claude-3-5-sonnet-20241022": { + "attachment": true, + "cost": { + "cache_read": 0.3, + "cache_write": 3.75, + "input": 3, + "output": 15 + }, + "id": "claude-3-5-sonnet-20241022", + "knowledge": "2024-04-30", + "last_updated": "2024-10-22", + "limit": { + "context": 200000, + "output": 8192 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Sonnet 3.5 v2", + "open_weights": false, + "reasoning": false, + "release_date": "2024-10-22", + "temperature": true, + "tool_call": true + }, + "claude-3-7-sonnet-20250219": { + "attachment": true, + "cost": { + "cache_read": 0.3, + "cache_write": 3.75, + "input": 3, + "output": 15 + }, + "id": "claude-3-7-sonnet-20250219", + "knowledge": "2024-10-31", + "last_updated": "2025-02-19", + "limit": { + "context": 200000, + "output": 64000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Sonnet 3.7", + "open_weights": false, + "reasoning": true, + "release_date": "2025-02-19", + "temperature": true, + "tool_call": true + }, + "claude-3-7-sonnet-latest": { + "attachment": true, + "cost": { + "cache_read": 0.3, + "cache_write": 3.75, + "input": 3, + "output": 15 + }, + "id": "claude-3-7-sonnet-latest", + "knowledge": "2024-10-31", + "last_updated": "2025-02-19", + "limit": { + "context": 200000, + "output": 64000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Sonnet 3.7 (latest)", + "open_weights": false, + "reasoning": true, + "release_date": "2025-02-19", + "temperature": true, + "tool_call": true + }, + "claude-3-haiku-20240307": { + "attachment": true, + "cost": { + "cache_read": 0.03, + "cache_write": 0.3, + "input": 0.25, + "output": 1.25 + }, + "id": "claude-3-haiku-20240307", + "knowledge": "2023-08-31", + "last_updated": "2024-03-13", + "limit": { + "context": 200000, + "output": 4096 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Haiku 3", + "open_weights": false, + "reasoning": false, + "release_date": "2024-03-13", + "temperature": true, + "tool_call": true + }, + "claude-3-opus-20240229": { + "attachment": true, + "cost": { + "cache_read": 1.5, + "cache_write": 18.75, + "input": 15, + "output": 75 + }, + "id": "claude-3-opus-20240229", + "knowledge": "2023-08-31", + "last_updated": "2024-02-29", + "limit": { + "context": 200000, + "output": 4096 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Opus 3", + "open_weights": false, + "reasoning": false, + "release_date": "2024-02-29", + "temperature": true, + "tool_call": true + }, + "claude-3-sonnet-20240229": { + "attachment": true, + "cost": { + "cache_read": 0.3, + "cache_write": 0.3, + "input": 3, + "output": 15 + }, + "id": "claude-3-sonnet-20240229", + "knowledge": "2023-08-31", + "last_updated": "2024-03-04", + "limit": { + "context": 200000, + "output": 4096 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Sonnet 3", + "open_weights": false, + "reasoning": false, + "release_date": "2024-03-04", + "temperature": true, + "tool_call": true + }, + "claude-haiku-4-5": { + "attachment": true, + "cost": { + "cache_read": 0.1, + "cache_write": 1.25, + "input": 1, + "output": 5 + }, + "id": "claude-haiku-4-5", + "knowledge": "2025-02-31", + "last_updated": "2025-10-15", + "limit": { + "context": 200000, + "output": 64000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Haiku 4.5 (latest)", + "open_weights": false, + "reasoning": true, + "release_date": "2025-10-15", + "temperature": true, + "tool_call": true + }, + "claude-haiku-4-5-20251001": { + "attachment": true, + "cost": { + "cache_read": 0.1, + "cache_write": 1.25, + "input": 1, + "output": 5 + }, + "id": "claude-haiku-4-5-20251001", + "knowledge": "2025-02-31", + "last_updated": "2025-10-15", + "limit": { + "context": 200000, + "output": 64000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Haiku 4.5", + "open_weights": false, + "reasoning": true, + "release_date": "2025-10-15", + "temperature": true, + "tool_call": true + }, + "claude-opus-4-0": { + "attachment": true, + "cost": { + "cache_read": 1.5, + "cache_write": 18.75, + "input": 15, + "output": 75 + }, + "id": "claude-opus-4-0", + "knowledge": "2025-03-31", + "last_updated": "2025-05-22", + "limit": { + "context": 200000, + "output": 32000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Opus 4 (latest)", + "open_weights": false, + "reasoning": true, + "release_date": "2025-05-22", + "temperature": true, + "tool_call": true + }, + "claude-opus-4-1": { + "attachment": true, + "cost": { + "cache_read": 1.5, + "cache_write": 18.75, + "input": 15, + "output": 75 + }, + "id": "claude-opus-4-1", + "knowledge": "2025-03-31", + "last_updated": "2025-08-05", + "limit": { + "context": 200000, + "output": 32000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Opus 4.1 (latest)", + "open_weights": false, + "reasoning": true, + "release_date": "2025-08-05", + "temperature": true, + "tool_call": true + }, + "claude-opus-4-1-20250805": { + "attachment": true, + "cost": { + "cache_read": 1.5, + "cache_write": 18.75, + "input": 15, + "output": 75 + }, + "id": "claude-opus-4-1-20250805", + "knowledge": "2025-03-31", + "last_updated": "2025-08-05", + "limit": { + "context": 200000, + "output": 32000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Opus 4.1", + "open_weights": false, + "reasoning": true, + "release_date": "2025-08-05", + "temperature": true, + "tool_call": true + }, + "claude-opus-4-20250514": { + "attachment": true, + "cost": { + "cache_read": 1.5, + "cache_write": 18.75, + "input": 15, + "output": 75 + }, + "id": "claude-opus-4-20250514", + "knowledge": "2025-03-31", + "last_updated": "2025-05-22", + "limit": { + "context": 200000, + "output": 32000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Opus 4", + "open_weights": false, + "reasoning": true, + "release_date": "2025-05-22", + "temperature": true, + "tool_call": true + }, + "claude-sonnet-4-0": { + "attachment": true, + "cost": { + "cache_read": 0.3, + "cache_write": 3.75, + "input": 3, + "output": 15 + }, + "id": "claude-sonnet-4-0", + "knowledge": "2025-03-31", + "last_updated": "2025-05-22", + "limit": { + "context": 200000, + "output": 64000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Sonnet 4 (latest)", + "open_weights": false, + "reasoning": true, + "release_date": "2025-05-22", + "temperature": true, + "tool_call": true + }, + "claude-sonnet-4-20250514": { + "attachment": true, + "cost": { + "cache_read": 0.3, + "cache_write": 3.75, + "input": 3, + "output": 15 + }, + "id": "claude-sonnet-4-20250514", + "knowledge": "2025-03-31", + "last_updated": "2025-05-22", + "limit": { + "context": 200000, + "output": 64000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Sonnet 4", + "open_weights": false, + "reasoning": true, + "release_date": "2025-05-22", + "temperature": true, + "tool_call": true + }, + "claude-sonnet-4-5": { + "attachment": true, + "cost": { + "cache_read": 0.3, + "cache_write": 3.75, + "input": 3, + "output": 15 + }, + "id": "claude-sonnet-4-5", + "knowledge": "2025-07-31", + "last_updated": "2025-09-29", + "limit": { + "context": 200000, + "output": 64000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Sonnet 4.5 (latest)", + "open_weights": false, + "reasoning": true, + "release_date": "2025-09-29", + "temperature": true, + "tool_call": true + }, + "claude-sonnet-4-5-20250929": { + "attachment": true, + "cost": { + "cache_read": 0.3, + "cache_write": 3.75, + "input": 3, + "output": 15 + }, + "id": "claude-sonnet-4-5-20250929", + "knowledge": "2025-07-31", + "last_updated": "2025-09-29", + "limit": { + "context": 200000, + "output": 64000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Claude Sonnet 4.5", + "open_weights": false, + "reasoning": true, + "release_date": "2025-09-29", + "temperature": true, + "tool_call": true + } + }, + "name": "Anthropic", + "npm": "@ai-sdk/anthropic" + } +} \ No newline at end of file diff --git a/libs/partners/anthropic/langchain_anthropic/data/profile_augmentations.toml b/libs/partners/anthropic/langchain_anthropic/data/profile_augmentations.toml new file mode 100644 index 0000000000000..d0619ad6cf7ed --- /dev/null +++ b/libs/partners/anthropic/langchain_anthropic/data/profile_augmentations.toml @@ -0,0 +1,14 @@ +provider = "anthropic" + +[overrides] +image_url_inputs = true +pdf_inputs = true +pdf_tool_message = true +image_tool_message = true +structured_output = false + +[overrides."claude-sonnet-4-5"] +structured_output = true + +[overrides."claude-opus-4-1"] +structured_output = true diff --git a/libs/partners/anthropic/pyproject.toml b/libs/partners/anthropic/pyproject.toml index 1df6eb53736a4..295a4c44acad3 100644 --- a/libs/partners/anthropic/pyproject.toml +++ b/libs/partners/anthropic/pyproject.toml @@ -29,6 +29,7 @@ Reddit = "https://www.reddit.com/r/LangChain/" [dependency-groups] test = [ "pytest>=7.3.0,<8.0.0", + "blockbuster>=1.5.5,<1.6", "freezegun>=1.2.2,<2.0.0", "pytest-mock>=3.10.0,<4.0.0", "syrupy>=4.0.2,<5.0.0", diff --git a/libs/partners/anthropic/tests/unit_tests/test_chat_models.py b/libs/partners/anthropic/tests/unit_tests/test_chat_models.py index dd930e82ce933..ea245cf93e65a 100644 --- a/libs/partners/anthropic/tests/unit_tests/test_chat_models.py +++ b/libs/partners/anthropic/tests/unit_tests/test_chat_models.py @@ -10,6 +10,7 @@ import anthropic import pytest from anthropic.types import Message, TextBlock, Usage +from blockbuster import blockbuster_ctx from langchain_core.messages import AIMessage, HumanMessage, SystemMessage, ToolMessage from langchain_core.runnables import RunnableBinding from langchain_core.tools import BaseTool @@ -1597,3 +1598,33 @@ def get_weather(location: str, unit: Literal["C", "F"]) -> str: tool_definition = model_with_tools.kwargs["tools"][0] # type: ignore[attr-defined] assert tool_definition["strict"] is True + + +def test_profile() -> None: + model = ChatAnthropic(model="claude-sonnet-4-20250514") + assert model.profile + assert not model.profile["structured_output"] + + model = ChatAnthropic(model="claude-sonnet-4-5") + assert model.profile + assert model.profile["structured_output"] + assert model.profile["tool_calling"] + + # Test overwriting a field + model.profile["tool_calling"] = False + assert not model.profile["tool_calling"] + + # Test we didn't mutate + model = ChatAnthropic(model="claude-sonnet-4-5") + assert model.profile + assert model.profile["tool_calling"] + + # Test passing in profile + model = ChatAnthropic(model="claude-sonnet-4-5", profile={"tool_calling": False}) + assert model.profile == {"tool_calling": False} + + +async def test_model_profile_not_blocking() -> None: + with blockbuster_ctx(): + model = ChatAnthropic(model="claude-sonnet-4-5") + _ = model.profile diff --git a/libs/partners/anthropic/uv.lock b/libs/partners/anthropic/uv.lock index a77b9e109ad1e..13a5204644da4 100644 --- a/libs/partners/anthropic/uv.lock +++ b/libs/partners/anthropic/uv.lock @@ -53,6 +53,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/15/b3/9b1a8074496371342ec1e796a96f99c82c945a339cd81a8e73de28b4cf9e/anyio-4.11.0-py3-none-any.whl", hash = "sha256:0287e96f4d26d4149305414d4e3bc32f0dcd0862365a4bddea19d7a1ec38c4fc", size = 109097, upload-time = "2025-09-23T09:19:10.601Z" }, ] +[[package]] +name = "blockbuster" +version = "1.5.25" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "forbiddenfruit", marker = "implementation_name == 'cpython'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7f/bc/57c49465decaeeedd58ce2d970b4cdfd93a74ba9993abff2dc498a31c283/blockbuster-1.5.25.tar.gz", hash = "sha256:b72f1d2aefdeecd2a820ddf1e1c8593bf00b96e9fdc4cd2199ebafd06f7cb8f0", size = 36058, upload-time = "2025-07-14T16:00:20.766Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0b/01/dccc277c014f171f61a6047bb22c684e16c7f2db6bb5c8cce1feaf41ec55/blockbuster-1.5.25-py3-none-any.whl", hash = "sha256:cb06229762273e0f5f3accdaed3d2c5a3b61b055e38843de202311ede21bb0f5", size = 13196, upload-time = "2025-07-14T16:00:19.396Z" }, +] + [[package]] name = "certifi" version = "2025.11.12" @@ -290,6 +302,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ab/84/02fc1827e8cdded4aa65baef11296a9bbe595c474f0d6d758af082d849fd/execnet-2.1.2-py3-none-any.whl", hash = "sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec", size = 40708, upload-time = "2025-11-12T09:56:36.333Z" }, ] +[[package]] +name = "forbiddenfruit" +version = "0.1.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e6/79/d4f20e91327c98096d605646bdc6a5ffedae820f38d378d3515c42ec5e60/forbiddenfruit-0.1.4.tar.gz", hash = "sha256:e3f7e66561a29ae129aac139a85d610dbf3dd896128187ed5454b6421f624253", size = 43756, upload-time = "2021-01-16T21:03:35.401Z" } + [[package]] name = "freezegun" version = "1.5.5" @@ -559,6 +577,7 @@ lint = [ { name = "ruff" }, ] test = [ + { name = "blockbuster" }, { name = "defusedxml" }, { name = "freezegun" }, { name = "langchain" }, @@ -597,6 +616,7 @@ requires-dist = [ dev = [{ name = "langchain-core", editable = "../../core" }] lint = [{ name = "ruff", specifier = ">=0.13.1,<0.14.0" }] test = [ + { name = "blockbuster", specifier = ">=1.5.5,<1.6" }, { name = "defusedxml", specifier = ">=0.7.1,<1.0.0" }, { name = "freezegun", specifier = ">=1.2.2,<2.0.0" }, { name = "langchain", editable = "../../langchain_v1" }, @@ -660,7 +680,6 @@ test = [ { name = "blockbuster", specifier = ">=1.5.18,<1.6.0" }, { name = "freezegun", specifier = ">=1.2.2,<2.0.0" }, { name = "grandalf", specifier = ">=0.8.0,<1.0.0" }, - { name = "langchain-model-profiles", directory = "../../model-profiles" }, { name = "langchain-tests", directory = "../../standard-tests" }, { name = "numpy", marker = "python_full_version < '3.13'", specifier = ">=1.26.4" }, { name = "numpy", marker = "python_full_version >= '3.13'", specifier = ">=2.1.0" }, @@ -677,7 +696,6 @@ test = [ ] test-integration = [] typing = [ - { name = "langchain-model-profiles", directory = "../../model-profiles" }, { name = "langchain-text-splitters", directory = "../../text-splitters" }, { name = "mypy", specifier = ">=1.18.1,<1.19.0" }, { name = "types-pyyaml", specifier = ">=6.0.12.2,<7.0.0.0" }, diff --git a/libs/partners/deepseek/langchain_deepseek/chat_models.py b/libs/partners/deepseek/langchain_deepseek/chat_models.py index eacc4a3bd7286..b2e26fcda9a3e 100644 --- a/libs/partners/deepseek/langchain_deepseek/chat_models.py +++ b/libs/partners/deepseek/langchain_deepseek/chat_models.py @@ -5,13 +5,18 @@ import json from collections.abc import Callable, Iterator, Sequence from json import JSONDecodeError -from typing import Any, Literal, TypeAlias +from pathlib import Path +from typing import Any, Literal, TypeAlias, cast import openai from langchain_core.callbacks import ( CallbackManagerForLLMRun, ) from langchain_core.language_models import LangSmithParams, LanguageModelInput +from langchain_core.language_models.profile import ModelProfile, ModelProfileRegistry +from langchain_core.language_models.profile._loader_utils import ( + load_profiles_from_data_dir, +) from langchain_core.messages import AIMessage, AIMessageChunk, BaseMessage from langchain_core.outputs import ChatGenerationChunk, ChatResult from langchain_core.runnables import Runnable @@ -28,6 +33,17 @@ _DictOrPydantic: TypeAlias = dict[str, Any] | BaseModel +_MODEL_PROFILES = cast( + "ModelProfileRegistry", + load_profiles_from_data_dir(Path(__file__).parent / "data", "deepseek"), +) + + +def _get_default_model_profile(model_name: str) -> ModelProfile: + default = _MODEL_PROFILES.get(model_name) or {} + return default.copy() + + class ChatDeepSeek(BaseChatOpenAI): """DeepSeek chat model integration to access models hosted in DeepSeek's API. @@ -232,6 +248,13 @@ def validate_environment(self) -> Self: self.async_client = self.root_async_client.chat.completions return self + @model_validator(mode="after") + def _set_model_profile(self) -> Self: + """Set model profile if not overridden.""" + if self.profile is None: + self.profile = _get_default_model_profile(self.model_name) + return self + def _get_request_payload( self, input_: LanguageModelInput, diff --git a/libs/partners/deepseek/langchain_deepseek/data/models.json b/libs/partners/deepseek/langchain_deepseek/data/models.json new file mode 100644 index 0000000000000..b944a8a96fb4b --- /dev/null +++ b/libs/partners/deepseek/langchain_deepseek/data/models.json @@ -0,0 +1,72 @@ +{ + "deepseek": { + "api": "https://api.deepseek.com", + "doc": "https://platform.deepseek.com/api-docs/pricing", + "env": [ + "DEEPSEEK_API_KEY" + ], + "id": "deepseek", + "models": { + "deepseek-chat": { + "attachment": true, + "cost": { + "cache_read": 0.028, + "input": 0.28, + "output": 0.42 + }, + "id": "deepseek-chat", + "knowledge": "2024-07", + "last_updated": "2025-09-29", + "limit": { + "context": 128000, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "DeepSeek Chat", + "open_weights": false, + "reasoning": false, + "release_date": "2024-12-26", + "temperature": true, + "tool_call": true + }, + "deepseek-reasoner": { + "attachment": true, + "cost": { + "cache_read": 0.028, + "input": 0.28, + "output": 0.42 + }, + "id": "deepseek-reasoner", + "knowledge": "2024-07", + "last_updated": "2025-09-29", + "limit": { + "context": 128000, + "output": 128000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "DeepSeek Reasoner", + "open_weights": false, + "reasoning": true, + "release_date": "2025-01-20", + "temperature": true, + "tool_call": true + } + }, + "name": "DeepSeek", + "npm": "@ai-sdk/openai-compatible" + } +} \ No newline at end of file diff --git a/libs/partners/deepseek/tests/unit_tests/test_chat_models.py b/libs/partners/deepseek/tests/unit_tests/test_chat_models.py index 781ee1fa4d332..29043c38e04e0 100644 --- a/libs/partners/deepseek/tests/unit_tests/test_chat_models.py +++ b/libs/partners/deepseek/tests/unit_tests/test_chat_models.py @@ -307,3 +307,10 @@ def test_with_structured_output_strict_mode_uses_beta_endpoint(self) -> None: # The structured model should work with beta endpoint assert structured_model is not None + + +def test_profile() -> None: + """Test that model profile is loaded correctly.""" + model = ChatDeepSeek(model="deepseek-reasoner", api_key=SecretStr("test_key")) + assert model.profile is not None + assert model.profile["reasoning_output"] diff --git a/libs/partners/fireworks/langchain_fireworks/chat_models.py b/libs/partners/fireworks/langchain_fireworks/chat_models.py index c8e3b18dfb2a9..0d7e374bdd6db 100644 --- a/libs/partners/fireworks/langchain_fireworks/chat_models.py +++ b/libs/partners/fireworks/langchain_fireworks/chat_models.py @@ -7,6 +7,7 @@ import logging from collections.abc import AsyncIterator, Callable, Iterator, Mapping, Sequence from operator import itemgetter +from pathlib import Path from typing import ( Any, Literal, @@ -25,6 +26,10 @@ agenerate_from_stream, generate_from_stream, ) +from langchain_core.language_models.profile import ModelProfile, ModelProfileRegistry +from langchain_core.language_models.profile._loader_utils import ( + load_profiles_from_data_dir, +) from langchain_core.messages import ( AIMessage, AIMessageChunk, @@ -83,6 +88,17 @@ logger = logging.getLogger(__name__) +_MODEL_PROFILES = cast( + "ModelProfileRegistry", + load_profiles_from_data_dir(Path(__file__).parent / "data", "fireworks-ai"), +) + + +def _get_default_model_profile(model_name: str) -> ModelProfile: + default = _MODEL_PROFILES.get(model_name) or {} + return default.copy() + + def _convert_dict_to_message(_dict: Mapping[str, Any]) -> BaseMessage: """Convert a dictionary to a LangChain message. @@ -404,6 +420,13 @@ def validate_environment(self) -> Self: self.async_client._max_retries = self.max_retries return self + @model_validator(mode="after") + def _set_model_profile(self) -> Self: + """Set model profile if not overridden.""" + if self.profile is None: + self.profile = _get_default_model_profile(self.model_name) + return self + @property def _default_params(self) -> dict[str, Any]: """Get the default parameters for calling Fireworks API.""" diff --git a/libs/partners/fireworks/langchain_fireworks/data/models.json b/libs/partners/fireworks/langchain_fireworks/data/models.json new file mode 100644 index 0000000000000..f56f08c2f0778 --- /dev/null +++ b/libs/partners/fireworks/langchain_fireworks/data/models.json @@ -0,0 +1,319 @@ +{ + "fireworks-ai": { + "api": "https://api.fireworks.ai/inference/v1/", + "doc": "https://fireworks.ai/docs/", + "env": [ + "FIREWORKS_API_KEY" + ], + "id": "fireworks-ai", + "models": { + "accounts/fireworks/models/deepseek-r1-0528": { + "attachment": false, + "cost": { + "input": 3, + "output": 8 + }, + "id": "accounts/fireworks/models/deepseek-r1-0528", + "knowledge": "2025-05", + "last_updated": "2025-05-28", + "limit": { + "context": 160000, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Deepseek R1 05/28", + "open_weights": true, + "reasoning": true, + "release_date": "2025-05-28", + "temperature": true, + "tool_call": true + }, + "accounts/fireworks/models/deepseek-v3-0324": { + "attachment": false, + "cost": { + "input": 0.9, + "output": 0.9 + }, + "id": "accounts/fireworks/models/deepseek-v3-0324", + "knowledge": "2024-10", + "last_updated": "2025-03-24", + "limit": { + "context": 160000, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Deepseek V3 03-24", + "open_weights": true, + "reasoning": false, + "release_date": "2025-03-24", + "temperature": true, + "tool_call": true + }, + "accounts/fireworks/models/deepseek-v3p1": { + "attachment": false, + "cost": { + "input": 0.56, + "output": 1.68 + }, + "id": "accounts/fireworks/models/deepseek-v3p1", + "knowledge": "2025-07", + "last_updated": "2025-08-21", + "limit": { + "context": 163840, + "output": 163840 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "DeepSeek V3.1", + "open_weights": true, + "reasoning": true, + "release_date": "2025-08-21", + "temperature": true, + "tool_call": true + }, + "accounts/fireworks/models/glm-4p5": { + "attachment": false, + "cost": { + "input": 0.55, + "output": 2.19 + }, + "id": "accounts/fireworks/models/glm-4p5", + "knowledge": "2025-04", + "last_updated": "2025-07-29", + "limit": { + "context": 131072, + "output": 131072 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GLM 4.5", + "open_weights": true, + "reasoning": true, + "release_date": "2025-07-29", + "temperature": true, + "tool_call": true + }, + "accounts/fireworks/models/glm-4p5-air": { + "attachment": false, + "cost": { + "input": 0.22, + "output": 0.88 + }, + "id": "accounts/fireworks/models/glm-4p5-air", + "knowledge": "2025-04", + "last_updated": "2025-08-01", + "limit": { + "context": 131072, + "output": 131072 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GLM 4.5 Air", + "open_weights": true, + "reasoning": true, + "release_date": "2025-08-01", + "temperature": true, + "tool_call": true + }, + "accounts/fireworks/models/gpt-oss-120b": { + "attachment": false, + "cost": { + "input": 0.15, + "output": 0.6 + }, + "id": "accounts/fireworks/models/gpt-oss-120b", + "last_updated": "2025-08-05", + "limit": { + "context": 131072, + "output": 32768 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GPT OSS 120B", + "open_weights": true, + "reasoning": true, + "release_date": "2025-08-05", + "temperature": true, + "tool_call": true + }, + "accounts/fireworks/models/gpt-oss-20b": { + "attachment": false, + "cost": { + "input": 0.05, + "output": 0.2 + }, + "id": "accounts/fireworks/models/gpt-oss-20b", + "last_updated": "2025-08-05", + "limit": { + "context": 131072, + "output": 32768 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GPT OSS 20B", + "open_weights": true, + "reasoning": true, + "release_date": "2025-08-05", + "temperature": true, + "tool_call": true + }, + "accounts/fireworks/models/kimi-k2-instruct": { + "attachment": false, + "cost": { + "input": 1, + "output": 3 + }, + "id": "accounts/fireworks/models/kimi-k2-instruct", + "knowledge": "2024-10", + "last_updated": "2025-07-11", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Kimi K2 Instruct", + "open_weights": true, + "reasoning": false, + "release_date": "2025-07-11", + "temperature": true, + "tool_call": true + }, + "accounts/fireworks/models/minimax-m2": { + "attachment": false, + "cost": { + "input": 0.3, + "output": 1.2 + }, + "id": "accounts/fireworks/models/minimax-m2", + "knowledge": "2024-11", + "last_updated": "2025-10-27", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "MiniMax-M2", + "open_weights": true, + "reasoning": true, + "release_date": "2025-10-27", + "temperature": true, + "tool_call": true + }, + "accounts/fireworks/models/qwen3-235b-a22b": { + "attachment": false, + "cost": { + "input": 0.22, + "output": 0.88 + }, + "id": "accounts/fireworks/models/qwen3-235b-a22b", + "knowledge": "2025-04", + "last_updated": "2025-04-29", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Qwen3 235B-A22B", + "open_weights": true, + "reasoning": true, + "release_date": "2025-04-29", + "temperature": true, + "tool_call": true + }, + "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct": { + "attachment": false, + "cost": { + "input": 0.45, + "output": 1.8 + }, + "id": "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct", + "last_updated": "2025-07-22", + "limit": { + "context": 256000, + "output": 32768 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Qwen3 Coder 480B A35B Instruct", + "open_weights": true, + "reasoning": false, + "release_date": "2025-07-22", + "temperature": true, + "tool_call": true + } + }, + "name": "Fireworks AI", + "npm": "@ai-sdk/openai-compatible" + } +} \ No newline at end of file diff --git a/libs/partners/fireworks/tests/unit_tests/test_standard.py b/libs/partners/fireworks/tests/unit_tests/test_standard.py index 58b443b672289..3e26e4e700313 100644 --- a/libs/partners/fireworks/tests/unit_tests/test_standard.py +++ b/libs/partners/fireworks/tests/unit_tests/test_standard.py @@ -35,3 +35,12 @@ def init_from_env_params(self) -> tuple[dict, dict, dict]: "fireworks_api_base": "https://base.com", }, ) + + +def test_profile() -> None: + """Test that model profile is loaded correctly.""" + model = ChatFireworks( + model="accounts/fireworks/models/gpt-oss-20b", + api_key="test_key", # type: ignore[arg-type] + ) + assert model.profile diff --git a/libs/partners/groq/langchain_groq/chat_models.py b/libs/partners/groq/langchain_groq/chat_models.py index 9fd02f230b216..06d52a96fe24b 100644 --- a/libs/partners/groq/langchain_groq/chat_models.py +++ b/libs/partners/groq/langchain_groq/chat_models.py @@ -6,6 +6,7 @@ import warnings from collections.abc import AsyncIterator, Callable, Iterator, Mapping, Sequence from operator import itemgetter +from pathlib import Path from typing import Any, Literal, cast from langchain_core.callbacks import ( @@ -19,6 +20,10 @@ agenerate_from_stream, generate_from_stream, ) +from langchain_core.language_models.profile import ModelProfile, ModelProfileRegistry +from langchain_core.language_models.profile._loader_utils import ( + load_profiles_from_data_dir, +) from langchain_core.messages import ( AIMessage, AIMessageChunk, @@ -65,6 +70,16 @@ from langchain_groq._compat import _convert_from_v1_to_groq from langchain_groq.version import __version__ +_MODEL_PROFILES = cast( + "ModelProfileRegistry", + load_profiles_from_data_dir(Path(__file__).parent / "data", "groq"), +) + + +def _get_default_model_profile(model_name: str) -> ModelProfile: + default = _MODEL_PROFILES.get(model_name) or {} + return default.copy() + class ChatGroq(BaseChatModel): r"""Groq Chat large language models API. @@ -490,6 +505,13 @@ def validate_environment(self) -> Self: raise ImportError(msg) from exc return self + @model_validator(mode="after") + def _set_model_profile(self) -> Self: + """Set model profile if not overridden.""" + if self.profile is None: + self.profile = _get_default_model_profile(self.model_name) + return self + # # Serializable class method overrides # diff --git a/libs/partners/groq/langchain_groq/data/models.json b/libs/partners/groq/langchain_groq/data/models.json new file mode 100644 index 0000000000000..c4cf5d868a1c3 --- /dev/null +++ b/libs/partners/groq/langchain_groq/data/models.json @@ -0,0 +1,495 @@ +{ + "groq": { + "doc": "https://console.groq.com/docs/models", + "env": [ + "GROQ_API_KEY" + ], + "id": "groq", + "models": { + "deepseek-r1-distill-llama-70b": { + "attachment": false, + "cost": { + "input": 0.75, + "output": 0.99 + }, + "id": "deepseek-r1-distill-llama-70b", + "knowledge": "2024-07", + "last_updated": "2025-01-20", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "DeepSeek R1 Distill Llama 70B", + "open_weights": true, + "reasoning": true, + "release_date": "2025-01-20", + "status": "deprecated", + "temperature": true, + "tool_call": true + }, + "gemma2-9b-it": { + "attachment": false, + "cost": { + "input": 0.2, + "output": 0.2 + }, + "id": "gemma2-9b-it", + "knowledge": "2024-06", + "last_updated": "2024-06-27", + "limit": { + "context": 8192, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Gemma 2 9B", + "open_weights": true, + "reasoning": false, + "release_date": "2024-06-27", + "status": "deprecated", + "temperature": true, + "tool_call": true + }, + "llama-3.1-8b-instant": { + "attachment": false, + "cost": { + "input": 0.05, + "output": 0.08 + }, + "id": "llama-3.1-8b-instant", + "knowledge": "2023-12", + "last_updated": "2024-07-23", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Llama 3.1 8B Instant", + "open_weights": true, + "reasoning": false, + "release_date": "2024-07-23", + "temperature": true, + "tool_call": true + }, + "llama-3.3-70b-versatile": { + "attachment": false, + "cost": { + "input": 0.59, + "output": 0.79 + }, + "id": "llama-3.3-70b-versatile", + "knowledge": "2023-12", + "last_updated": "2024-12-06", + "limit": { + "context": 131072, + "output": 32768 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Llama 3.3 70B Versatile", + "open_weights": true, + "reasoning": false, + "release_date": "2024-12-06", + "temperature": true, + "tool_call": true + }, + "llama-guard-3-8b": { + "attachment": false, + "cost": { + "input": 0.2, + "output": 0.2 + }, + "id": "llama-guard-3-8b", + "last_updated": "2024-07-23", + "limit": { + "context": 8192, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Llama Guard 3 8B", + "open_weights": true, + "reasoning": false, + "release_date": "2024-07-23", + "status": "deprecated", + "temperature": true, + "tool_call": false + }, + "llama3-70b-8192": { + "attachment": false, + "cost": { + "input": 0.59, + "output": 0.79 + }, + "id": "llama3-70b-8192", + "knowledge": "2023-03", + "last_updated": "2024-04-18", + "limit": { + "context": 8192, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Llama 3 70B", + "open_weights": true, + "reasoning": false, + "release_date": "2024-04-18", + "status": "deprecated", + "temperature": true, + "tool_call": true + }, + "llama3-8b-8192": { + "attachment": false, + "cost": { + "input": 0.05, + "output": 0.08 + }, + "id": "llama3-8b-8192", + "knowledge": "2023-03", + "last_updated": "2024-04-18", + "limit": { + "context": 8192, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Llama 3 8B", + "open_weights": true, + "reasoning": false, + "release_date": "2024-04-18", + "status": "deprecated", + "temperature": true, + "tool_call": true + }, + "meta-llama/llama-4-maverick-17b-128e-instruct": { + "attachment": false, + "cost": { + "input": 0.2, + "output": 0.6 + }, + "id": "meta-llama/llama-4-maverick-17b-128e-instruct", + "knowledge": "2024-08", + "last_updated": "2025-04-05", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Llama 4 Maverick 17B", + "open_weights": true, + "reasoning": false, + "release_date": "2025-04-05", + "temperature": true, + "tool_call": true + }, + "meta-llama/llama-4-scout-17b-16e-instruct": { + "attachment": false, + "cost": { + "input": 0.11, + "output": 0.34 + }, + "id": "meta-llama/llama-4-scout-17b-16e-instruct", + "knowledge": "2024-08", + "last_updated": "2025-04-05", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Llama 4 Scout 17B", + "open_weights": true, + "reasoning": false, + "release_date": "2025-04-05", + "temperature": true, + "tool_call": true + }, + "meta-llama/llama-guard-4-12b": { + "attachment": false, + "cost": { + "input": 0.2, + "output": 0.2 + }, + "id": "meta-llama/llama-guard-4-12b", + "last_updated": "2025-04-05", + "limit": { + "context": 131072, + "output": 128 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Llama Guard 4 12B", + "open_weights": true, + "reasoning": false, + "release_date": "2025-04-05", + "temperature": true, + "tool_call": false + }, + "mistral-saba-24b": { + "attachment": false, + "cost": { + "input": 0.79, + "output": 0.79 + }, + "id": "mistral-saba-24b", + "knowledge": "2024-08", + "last_updated": "2025-02-06", + "limit": { + "context": 32768, + "output": 32768 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Mistral Saba 24B", + "open_weights": false, + "reasoning": false, + "release_date": "2025-02-06", + "status": "deprecated", + "temperature": true, + "tool_call": true + }, + "moonshotai/kimi-k2-instruct": { + "attachment": false, + "cost": { + "input": 1, + "output": 3 + }, + "id": "moonshotai/kimi-k2-instruct", + "knowledge": "2024-10", + "last_updated": "2025-07-14", + "limit": { + "context": 131072, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Kimi K2 Instruct", + "open_weights": true, + "reasoning": false, + "release_date": "2025-07-14", + "status": "deprecated", + "temperature": true, + "tool_call": true + }, + "moonshotai/kimi-k2-instruct-0905": { + "attachment": false, + "cost": { + "input": 1, + "output": 3 + }, + "id": "moonshotai/kimi-k2-instruct-0905", + "knowledge": "2024-10", + "last_updated": "2025-09-05", + "limit": { + "context": 262144, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Kimi K2 Instruct 0905", + "open_weights": true, + "reasoning": false, + "release_date": "2025-09-05", + "temperature": true, + "tool_call": true + }, + "openai/gpt-oss-120b": { + "attachment": false, + "cost": { + "input": 0.15, + "output": 0.75 + }, + "id": "openai/gpt-oss-120b", + "last_updated": "2025-08-05", + "limit": { + "context": 131072, + "output": 32768 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GPT OSS 120B", + "open_weights": true, + "reasoning": true, + "release_date": "2025-08-05", + "temperature": true, + "tool_call": true + }, + "openai/gpt-oss-20b": { + "attachment": false, + "cost": { + "input": 0.1, + "output": 0.5 + }, + "id": "openai/gpt-oss-20b", + "last_updated": "2025-08-05", + "limit": { + "context": 131072, + "output": 32768 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GPT OSS 20B", + "open_weights": true, + "reasoning": true, + "release_date": "2025-08-05", + "temperature": true, + "tool_call": true + }, + "qwen-qwq-32b": { + "attachment": false, + "cost": { + "input": 0.29, + "output": 0.39 + }, + "id": "qwen-qwq-32b", + "knowledge": "2024-09", + "last_updated": "2024-11-27", + "limit": { + "context": 131072, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Qwen QwQ 32B", + "open_weights": true, + "reasoning": true, + "release_date": "2024-11-27", + "temperature": true, + "tool_call": true + }, + "qwen/qwen3-32b": { + "attachment": false, + "cost": { + "input": 0.29, + "output": 0.59 + }, + "id": "qwen/qwen3-32b", + "knowledge": "2024-11-08", + "last_updated": "2024-12-23", + "limit": { + "context": 131072, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Qwen3 32B", + "open_weights": true, + "reasoning": true, + "release_date": "2024-12-23", + "temperature": true, + "tool_call": true + } + }, + "name": "Groq", + "npm": "@ai-sdk/groq" + } +} \ No newline at end of file diff --git a/libs/partners/groq/tests/unit_tests/test_chat_models.py b/libs/partners/groq/tests/unit_tests/test_chat_models.py index a6b0f344d3f9a..0a9991c759883 100644 --- a/libs/partners/groq/tests/unit_tests/test_chat_models.py +++ b/libs/partners/groq/tests/unit_tests/test_chat_models.py @@ -939,3 +939,8 @@ def test_combine_llm_outputs_with_missing_details() -> None: assert result["token_usage"]["total_tokens"] == 450 assert result["token_usage"]["output_tokens_details"]["reasoning_tokens"] == 40 assert "input_tokens_details" not in result["token_usage"] + + +def test_profile() -> None: + model = ChatGroq(model="openai/gpt-oss-20b") + assert model.profile diff --git a/libs/partners/huggingface/langchain_huggingface/chat_models/huggingface.py b/libs/partners/huggingface/langchain_huggingface/chat_models/huggingface.py index 8fc6037d2ea64..311c868e01fec 100644 --- a/libs/partners/huggingface/langchain_huggingface/chat_models/huggingface.py +++ b/libs/partners/huggingface/langchain_huggingface/chat_models/huggingface.py @@ -7,6 +7,7 @@ from collections.abc import AsyncIterator, Callable, Iterator, Mapping, Sequence from dataclasses import dataclass from operator import itemgetter +from pathlib import Path from typing import Any, Literal, cast from langchain_core.callbacks.manager import ( @@ -19,6 +20,10 @@ agenerate_from_stream, generate_from_stream, ) +from langchain_core.language_models.profile import ModelProfile, ModelProfileRegistry +from langchain_core.language_models.profile._loader_utils import ( + load_profiles_from_data_dir, +) from langchain_core.messages import ( AIMessage, AIMessageChunk, @@ -64,6 +69,16 @@ from langchain_huggingface.llms.huggingface_endpoint import HuggingFaceEndpoint from langchain_huggingface.llms.huggingface_pipeline import HuggingFacePipeline +_MODEL_PROFILES = cast( + "ModelProfileRegistry", + load_profiles_from_data_dir(Path(__file__).parent.parent / "data", "huggingface"), +) + + +def _get_default_model_profile(model_name: str) -> ModelProfile: + default = _MODEL_PROFILES.get(model_name) or {} + return default.copy() + @dataclass class TGI_RESPONSE: @@ -580,6 +595,13 @@ def validate_llm(self) -> Self: raise TypeError(msg) return self + @model_validator(mode="after") + def _set_model_profile(self) -> Self: + """Set model profile if not overridden.""" + if self.profile is None and self.model_id: + self.profile = _get_default_model_profile(self.model_id) + return self + def _create_chat_result(self, response: dict) -> ChatResult: generations = [] token_usage = response.get("usage", {}) diff --git a/libs/partners/huggingface/langchain_huggingface/data/models.json b/libs/partners/huggingface/langchain_huggingface/data/models.json new file mode 100644 index 0000000000000..491a41ef5a194 --- /dev/null +++ b/libs/partners/huggingface/langchain_huggingface/data/models.json @@ -0,0 +1,407 @@ +{ + "huggingface": { + "api": "https://router.huggingface.co/v1", + "doc": "https://huggingface.co/docs/inference-providers", + "env": [ + "HF_TOKEN" + ], + "id": "huggingface", + "models": { + "MiniMaxAI/MiniMax-M2": { + "attachment": false, + "cost": { + "input": 0.3, + "output": 1.2 + }, + "id": "MiniMaxAI/MiniMax-M2", + "knowledge": "2025-10", + "last_updated": "2025-10-27", + "limit": { + "context": 204800, + "output": 204800 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "MiniMax-M2", + "open_weights": true, + "reasoning": true, + "release_date": "2025-10-27", + "temperature": true, + "tool_call": true + }, + "Qwen/Qwen3-235B-A22B-Thinking-2507": { + "attachment": false, + "cost": { + "input": 0.3, + "output": 3 + }, + "id": "Qwen/Qwen3-235B-A22B-Thinking-2507", + "knowledge": "2025-04", + "last_updated": "2025-07-25", + "limit": { + "context": 262144, + "output": 131072 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Qwen3-235B-A22B-Thinking-2507", + "open_weights": true, + "reasoning": true, + "release_date": "2025-07-25", + "temperature": true, + "tool_call": true + }, + "Qwen/Qwen3-Coder-480B-A35B-Instruct": { + "attachment": false, + "cost": { + "input": 2, + "output": 2 + }, + "id": "Qwen/Qwen3-Coder-480B-A35B-Instruct", + "knowledge": "2025-04", + "last_updated": "2025-07-23", + "limit": { + "context": 262144, + "output": 66536 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Qwen3-Coder-480B-A35B-Instruct", + "open_weights": true, + "reasoning": false, + "release_date": "2025-07-23", + "temperature": true, + "tool_call": true + }, + "Qwen/Qwen3-Embedding-4B": { + "attachment": false, + "cost": { + "input": 0.01, + "output": 0 + }, + "id": "Qwen/Qwen3-Embedding-4B", + "knowledge": "2024-12", + "last_updated": "2025-01-01", + "limit": { + "context": 32000, + "output": 2048 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Qwen 3 Embedding 4B", + "open_weights": true, + "reasoning": false, + "release_date": "2025-01-01", + "temperature": false, + "tool_call": false + }, + "Qwen/Qwen3-Embedding-8B": { + "attachment": false, + "cost": { + "input": 0.01, + "output": 0 + }, + "id": "Qwen/Qwen3-Embedding-8B", + "knowledge": "2024-12", + "last_updated": "2025-01-01", + "limit": { + "context": 32000, + "output": 4096 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Qwen 3 Embedding 4B", + "open_weights": true, + "reasoning": false, + "release_date": "2025-01-01", + "temperature": false, + "tool_call": false + }, + "Qwen/Qwen3-Next-80B-A3B-Instruct": { + "attachment": false, + "cost": { + "input": 0.25, + "output": 1 + }, + "id": "Qwen/Qwen3-Next-80B-A3B-Instruct", + "knowledge": "2025-04", + "last_updated": "2025-09-11", + "limit": { + "context": 262144, + "output": 66536 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Qwen3-Next-80B-A3B-Instruct", + "open_weights": true, + "reasoning": false, + "release_date": "2025-09-11", + "temperature": true, + "tool_call": true + }, + "Qwen/Qwen3-Next-80B-A3B-Thinking": { + "attachment": false, + "cost": { + "input": 0.3, + "output": 2 + }, + "id": "Qwen/Qwen3-Next-80B-A3B-Thinking", + "knowledge": "2025-04", + "last_updated": "2025-09-11", + "limit": { + "context": 262144, + "output": 131072 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Qwen3-Next-80B-A3B-Thinking", + "open_weights": true, + "reasoning": false, + "release_date": "2025-09-11", + "temperature": true, + "tool_call": true + }, + "deepseek-ai/DeepSeek-R1-0528": { + "attachment": false, + "cost": { + "input": 3, + "output": 5 + }, + "id": "deepseek-ai/DeepSeek-R1-0528", + "knowledge": "2025-05", + "last_updated": "2025-05-28", + "limit": { + "context": 163840, + "output": 163840 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "DeepSeek-R1-0528", + "open_weights": true, + "reasoning": true, + "release_date": "2025-05-28", + "temperature": true, + "tool_call": true + }, + "deepseek-ai/Deepseek-V3-0324": { + "attachment": false, + "cost": { + "input": 1.25, + "output": 1.25 + }, + "id": "deepseek-ai/Deepseek-V3-0324", + "knowledge": "2024-10", + "last_updated": "2025-03-24", + "limit": { + "context": 16384, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "DeepSeek-V3-0324", + "open_weights": true, + "reasoning": false, + "release_date": "2025-03-24", + "temperature": true, + "tool_call": true + }, + "moonshotai/Kimi-K2-Instruct": { + "attachment": false, + "cost": { + "input": 1, + "output": 3 + }, + "id": "moonshotai/Kimi-K2-Instruct", + "knowledge": "2024-10", + "last_updated": "2025-07-14", + "limit": { + "context": 131072, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Kimi-K2-Instruct", + "open_weights": true, + "reasoning": false, + "release_date": "2025-07-14", + "temperature": true, + "tool_call": true + }, + "moonshotai/Kimi-K2-Instruct-0905": { + "attachment": false, + "cost": { + "input": 1, + "output": 3 + }, + "id": "moonshotai/Kimi-K2-Instruct-0905", + "knowledge": "2024-10", + "last_updated": "2025-09-04", + "limit": { + "context": 262144, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Kimi-K2-Instruct-0905", + "open_weights": true, + "reasoning": false, + "release_date": "2025-09-04", + "temperature": true, + "tool_call": true + }, + "zai-org/GLM-4.5": { + "attachment": false, + "cost": { + "input": 0.6, + "output": 2.2 + }, + "id": "zai-org/GLM-4.5", + "knowledge": "2025-04", + "last_updated": "2025-07-28", + "limit": { + "context": 131072, + "output": 98304 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GLM-4.5", + "open_weights": true, + "reasoning": true, + "release_date": "2025-07-28", + "temperature": true, + "tool_call": true + }, + "zai-org/GLM-4.5-Air": { + "attachment": false, + "cost": { + "input": 0.2, + "output": 1.1 + }, + "id": "zai-org/GLM-4.5-Air", + "knowledge": "2025-04", + "last_updated": "2025-07-28", + "limit": { + "context": 128000, + "output": 96000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GLM-4.5-Air", + "open_weights": true, + "reasoning": true, + "release_date": "2025-07-28", + "temperature": true, + "tool_call": true + }, + "zai-org/GLM-4.6": { + "attachment": false, + "cost": { + "cache_read": 0.11, + "input": 0.6, + "output": 2.2 + }, + "id": "zai-org/GLM-4.6", + "knowledge": "2025-04", + "last_updated": "2025-09-30", + "limit": { + "context": 200000, + "output": 128000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GLM-4.6", + "open_weights": true, + "reasoning": true, + "release_date": "2025-09-30", + "temperature": true, + "tool_call": true + } + }, + "name": "Hugging Face", + "npm": "@ai-sdk/openai-compatible" + } +} \ No newline at end of file diff --git a/libs/partners/huggingface/tests/unit_tests/test_chat_models.py b/libs/partners/huggingface/tests/unit_tests/test_chat_models.py index 377c60a7539e7..4b9982986df5a 100644 --- a/libs/partners/huggingface/tests/unit_tests/test_chat_models.py +++ b/libs/partners/huggingface/tests/unit_tests/test_chat_models.py @@ -325,3 +325,15 @@ def test_inheritance_with_empty_llm() -> None: # relevant attrs assert chat.max_tokens is None assert chat.temperature is None + + +def test_profile() -> None: + empty_llm = Mock(spec=HuggingFaceEndpoint) + empty_llm.repo_id = "test/model" + empty_llm.model = "test/model" + + model = ChatHuggingFace( + model_id="moonshotai/Kimi-K2-Instruct-0905", + llm=empty_llm, + ) + assert model.profile diff --git a/libs/partners/mistralai/langchain_mistralai/chat_models.py b/libs/partners/mistralai/langchain_mistralai/chat_models.py index 660c38614c2e5..f909f191098d5 100644 --- a/libs/partners/mistralai/langchain_mistralai/chat_models.py +++ b/libs/partners/mistralai/langchain_mistralai/chat_models.py @@ -9,6 +9,7 @@ import uuid from collections.abc import Callable # noqa: TC003 from operator import itemgetter +from pathlib import Path from typing import ( TYPE_CHECKING, Any, @@ -26,6 +27,10 @@ from langchain_core.language_models import LanguageModelInput from langchain_core.language_models.chat_models import BaseChatModel, LangSmithParams from langchain_core.language_models.llms import create_base_retry_decorator +from langchain_core.language_models.profile import ModelProfile, ModelProfileRegistry +from langchain_core.language_models.profile._loader_utils import ( + load_profiles_from_data_dir, +) from langchain_core.messages import ( AIMessage, AIMessageChunk, @@ -86,6 +91,17 @@ global_ssl_context = ssl.create_default_context(cafile=certifi.where()) +_MODEL_PROFILES = cast( + "ModelProfileRegistry", + load_profiles_from_data_dir(Path(__file__).parent / "data", "mistral"), +) + + +def _get_default_model_profile(model_name: str) -> ModelProfile: + default = _MODEL_PROFILES.get(model_name) or {} + return default.copy() + + def _create_retry_decorator( llm: ChatMistralAI, run_manager: AsyncCallbackManagerForLLMRun | CallbackManagerForLLMRun | None = None, @@ -632,6 +648,13 @@ def validate_environment(self) -> Self: return self + @model_validator(mode="after") + def _set_model_profile(self) -> Self: + """Set model profile if not overridden.""" + if self.profile is None: + self.profile = _get_default_model_profile(self.model) + return self + def _generate( self, messages: list[BaseMessage], diff --git a/libs/partners/mistralai/langchain_mistralai/data/models.json b/libs/partners/mistralai/langchain_mistralai/data/models.json new file mode 100644 index 0000000000000..75eab19c0e292 --- /dev/null +++ b/libs/partners/mistralai/langchain_mistralai/data/models.json @@ -0,0 +1,551 @@ +{ + "mistral": { + "doc": "https://docs.mistral.ai/getting-started/models/", + "env": [ + "MISTRAL_API_KEY" + ], + "id": "mistral", + "models": { + "codestral-latest": { + "attachment": false, + "cost": { + "input": 0.3, + "output": 0.9 + }, + "id": "codestral-latest", + "knowledge": "2024-10", + "last_updated": "2025-01-04", + "limit": { + "context": 256000, + "output": 4096 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Codestral", + "open_weights": true, + "reasoning": false, + "release_date": "2024-05-29", + "temperature": true, + "tool_call": true + }, + "devstral-medium-2507": { + "attachment": false, + "cost": { + "input": 0.4, + "output": 2 + }, + "id": "devstral-medium-2507", + "knowledge": "2025-05", + "last_updated": "2025-07-10", + "limit": { + "context": 128000, + "output": 128000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Devstral Medium", + "open_weights": true, + "reasoning": false, + "release_date": "2025-07-10", + "temperature": true, + "tool_call": true + }, + "devstral-small-2505": { + "attachment": false, + "cost": { + "input": 0.1, + "output": 0.3 + }, + "id": "devstral-small-2505", + "knowledge": "2025-05", + "last_updated": "2025-05-07", + "limit": { + "context": 128000, + "output": 128000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Devstral Small 2505", + "open_weights": true, + "reasoning": false, + "release_date": "2025-05-07", + "temperature": true, + "tool_call": true + }, + "devstral-small-2507": { + "attachment": false, + "cost": { + "input": 0.1, + "output": 0.3 + }, + "id": "devstral-small-2507", + "knowledge": "2025-05", + "last_updated": "2025-07-10", + "limit": { + "context": 128000, + "output": 128000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Devstral Small", + "open_weights": true, + "reasoning": false, + "release_date": "2025-07-10", + "temperature": true, + "tool_call": true + }, + "magistral-medium-latest": { + "attachment": false, + "cost": { + "input": 2, + "output": 5 + }, + "id": "magistral-medium-latest", + "knowledge": "2025-06", + "last_updated": "2025-03-20", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Magistral Medium", + "open_weights": true, + "reasoning": true, + "release_date": "2025-03-17", + "temperature": true, + "tool_call": true + }, + "magistral-small": { + "attachment": false, + "cost": { + "input": 0.5, + "output": 1.5 + }, + "id": "magistral-small", + "knowledge": "2025-06", + "last_updated": "2025-03-17", + "limit": { + "context": 128000, + "output": 128000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Magistral Small", + "open_weights": true, + "reasoning": true, + "release_date": "2025-03-17", + "temperature": true, + "tool_call": true + }, + "ministral-3b-latest": { + "attachment": false, + "cost": { + "input": 0.04, + "output": 0.04 + }, + "id": "ministral-3b-latest", + "knowledge": "2024-10", + "last_updated": "2024-10-04", + "limit": { + "context": 128000, + "output": 128000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Ministral 3B", + "open_weights": true, + "reasoning": false, + "release_date": "2024-10-01", + "temperature": true, + "tool_call": true + }, + "ministral-8b-latest": { + "attachment": false, + "cost": { + "input": 0.1, + "output": 0.1 + }, + "id": "ministral-8b-latest", + "knowledge": "2024-10", + "last_updated": "2024-10-04", + "limit": { + "context": 128000, + "output": 128000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Ministral 8B", + "open_weights": true, + "reasoning": false, + "release_date": "2024-10-01", + "temperature": true, + "tool_call": true + }, + "mistral-large-latest": { + "attachment": false, + "cost": { + "input": 2, + "output": 6 + }, + "id": "mistral-large-latest", + "knowledge": "2024-11", + "last_updated": "2024-11-04", + "limit": { + "context": 131072, + "output": 16384 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Mistral Large", + "open_weights": true, + "reasoning": false, + "release_date": "2024-11-01", + "temperature": true, + "tool_call": true + }, + "mistral-medium-2505": { + "attachment": true, + "cost": { + "input": 0.4, + "output": 2 + }, + "id": "mistral-medium-2505", + "knowledge": "2025-05", + "last_updated": "2025-05-07", + "limit": { + "context": 131072, + "output": 131072 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Mistral Medium 3", + "open_weights": false, + "reasoning": false, + "release_date": "2025-05-07", + "temperature": true, + "tool_call": true + }, + "mistral-medium-2508": { + "attachment": true, + "cost": { + "input": 0.4, + "output": 2 + }, + "id": "mistral-medium-2508", + "knowledge": "2025-05", + "last_updated": "2025-08-12", + "limit": { + "context": 262144, + "output": 262144 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Mistral Medium 3.1", + "open_weights": false, + "reasoning": false, + "release_date": "2025-08-12", + "temperature": true, + "tool_call": true + }, + "mistral-medium-latest": { + "attachment": false, + "cost": { + "input": 0.4, + "output": 2 + }, + "id": "mistral-medium-latest", + "knowledge": "2025-05", + "last_updated": "2025-05-10", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Mistral Medium", + "open_weights": true, + "reasoning": false, + "release_date": "2025-05-07", + "temperature": true, + "tool_call": true + }, + "mistral-nemo": { + "attachment": false, + "cost": { + "input": 0.15, + "output": 0.15 + }, + "id": "mistral-nemo", + "knowledge": "2024-07", + "last_updated": "2024-07-01", + "limit": { + "context": 128000, + "output": 128000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Mistral Nemo", + "open_weights": true, + "reasoning": false, + "release_date": "2024-07-01", + "temperature": true, + "tool_call": true + }, + "mistral-small-latest": { + "attachment": false, + "cost": { + "input": 0.1, + "output": 0.3 + }, + "id": "mistral-small-latest", + "knowledge": "2025-03", + "last_updated": "2024-09-04", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Mistral Small", + "open_weights": true, + "reasoning": false, + "release_date": "2024-09-01", + "temperature": true, + "tool_call": true + }, + "open-mistral-7b": { + "attachment": false, + "cost": { + "input": 0.25, + "output": 0.25 + }, + "id": "open-mistral-7b", + "knowledge": "2023-12", + "last_updated": "2023-09-27", + "limit": { + "context": 8000, + "output": 8000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Mistral 7B", + "open_weights": true, + "reasoning": false, + "release_date": "2023-09-27", + "temperature": true, + "tool_call": true + }, + "open-mixtral-8x22b": { + "attachment": false, + "cost": { + "input": 2, + "output": 6 + }, + "id": "open-mixtral-8x22b", + "knowledge": "2024-04", + "last_updated": "2024-04-17", + "limit": { + "context": 64000, + "output": 64000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Mixtral 8x22B", + "open_weights": true, + "reasoning": false, + "release_date": "2024-04-17", + "temperature": true, + "tool_call": true + }, + "open-mixtral-8x7b": { + "attachment": false, + "cost": { + "input": 0.7, + "output": 0.7 + }, + "id": "open-mixtral-8x7b", + "knowledge": "2024-01", + "last_updated": "2023-12-11", + "limit": { + "context": 32000, + "output": 32000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Mixtral 8x7B", + "open_weights": true, + "reasoning": false, + "release_date": "2023-12-11", + "temperature": true, + "tool_call": true + }, + "pixtral-12b": { + "attachment": true, + "cost": { + "input": 0.15, + "output": 0.15 + }, + "id": "pixtral-12b", + "knowledge": "2024-09", + "last_updated": "2024-09-01", + "limit": { + "context": 128000, + "output": 128000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Pixtral 12B", + "open_weights": true, + "reasoning": false, + "release_date": "2024-09-01", + "temperature": true, + "tool_call": true + }, + "pixtral-large-latest": { + "attachment": true, + "cost": { + "input": 2, + "output": 6 + }, + "id": "pixtral-large-latest", + "knowledge": "2024-11", + "last_updated": "2024-11-04", + "limit": { + "context": 128000, + "output": 128000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Pixtral Large", + "open_weights": true, + "reasoning": false, + "release_date": "2024-11-01", + "temperature": true, + "tool_call": true + } + }, + "name": "Mistral", + "npm": "@ai-sdk/mistral" + } +} \ No newline at end of file diff --git a/libs/partners/mistralai/tests/unit_tests/test_chat_models.py b/libs/partners/mistralai/tests/unit_tests/test_chat_models.py index 724531694b875..d3c2754449b15 100644 --- a/libs/partners/mistralai/tests/unit_tests/test_chat_models.py +++ b/libs/partners/mistralai/tests/unit_tests/test_chat_models.py @@ -350,3 +350,8 @@ def test_no_duplicate_tool_calls_when_multiple_tools() -> None: ids = [tc.get("id") for tc in tool_calls if isinstance(tc, dict)] assert len(ids) == 2 assert len(set(ids)) == 2, f"Duplicate tool call IDs found: {ids}" + + +def test_profile() -> None: + model = ChatMistralAI(model="mistral-large-latest") # type: ignore[call-arg] + assert model.profile diff --git a/libs/partners/openai/langchain_openai/chat_models/azure.py b/libs/partners/openai/langchain_openai/chat_models/azure.py index 183e27fa6816b..f65257a81a80b 100644 --- a/libs/partners/openai/langchain_openai/chat_models/azure.py +++ b/libs/partners/openai/langchain_openai/chat_models/azure.py @@ -17,7 +17,7 @@ from pydantic import BaseModel, Field, SecretStr, model_validator from typing_extensions import Self -from langchain_openai.chat_models.base import BaseChatOpenAI +from langchain_openai.chat_models.base import BaseChatOpenAI, _get_default_model_profile logger = logging.getLogger(__name__) @@ -701,6 +701,13 @@ def validate_environment(self) -> Self: self.async_client = self.root_async_client.chat.completions return self + @model_validator(mode="after") + def _set_model_profile(self) -> Self: + """Set model profile if not overridden.""" + if self.profile is None and self.deployment_name is not None: + self.profile = _get_default_model_profile(self.deployment_name) + return self + @property def _identifying_params(self) -> dict[str, Any]: """Get the identifying parameters.""" diff --git a/libs/partners/openai/langchain_openai/chat_models/base.py b/libs/partners/openai/langchain_openai/chat_models/base.py index 0dae21a19c3d4..9840e6c80c24e 100644 --- a/libs/partners/openai/langchain_openai/chat_models/base.py +++ b/libs/partners/openai/langchain_openai/chat_models/base.py @@ -23,6 +23,7 @@ from json import JSONDecodeError from math import ceil from operator import itemgetter +from pathlib import Path from typing import ( TYPE_CHECKING, Any, @@ -45,6 +46,10 @@ BaseChatModel, LangSmithParams, ) +from langchain_core.language_models.profile import ModelProfileRegistry +from langchain_core.language_models.profile._loader_utils import ( + load_profiles_from_data_dir, +) from langchain_core.messages import ( AIMessage, AIMessageChunk, @@ -125,6 +130,7 @@ ) if TYPE_CHECKING: + from langchain_core.language_models.profile import ModelProfile from openai.types.responses import Response logger = logging.getLogger(__name__) @@ -133,6 +139,17 @@ # https://www.python-httpx.org/advanced/ssl/#configuring-client-instances global_ssl_context = ssl.create_default_context(cafile=certifi.where()) +_MODEL_PROFILES = cast( + ModelProfileRegistry, + load_profiles_from_data_dir(Path(__file__).parent.parent / "data", "openai"), +) + + +def _get_default_model_profile(model_name: str) -> ModelProfile: + default = _MODEL_PROFILES.get(model_name) or {} + return default.copy() + + WellKnownTools = ( "file_search", "web_search_preview", @@ -952,6 +969,13 @@ def validate_environment(self) -> Self: self.async_client = self.root_async_client.chat.completions return self + @model_validator(mode="after") + def _set_model_profile(self) -> Self: + """Set model profile if not overridden.""" + if self.profile is None: + self.profile = _get_default_model_profile(self.model_name) + return self + @property def _default_params(self) -> dict[str, Any]: """Get the default parameters for calling OpenAI API.""" diff --git a/libs/partners/openai/langchain_openai/data/models.json b/libs/partners/openai/langchain_openai/data/models.json new file mode 100644 index 0000000000000..d5f5cde1ce083 --- /dev/null +++ b/libs/partners/openai/langchain_openai/data/models.json @@ -0,0 +1,1073 @@ +{ + "openai": { + "doc": "https://platform.openai.com/docs/models", + "env": [ + "OPENAI_API_KEY" + ], + "id": "openai", + "models": { + "codex-mini-latest": { + "attachment": true, + "cost": { + "cache_read": 0.375, + "input": 1.5, + "output": 6 + }, + "id": "codex-mini-latest", + "knowledge": "2024-04", + "last_updated": "2025-05-16", + "limit": { + "context": 200000, + "output": 100000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Codex Mini", + "open_weights": false, + "reasoning": true, + "release_date": "2025-05-16", + "temperature": false, + "tool_call": true + }, + "gpt-3.5-turbo": { + "attachment": false, + "cost": { + "cache_read": 1.25, + "input": 0.5, + "output": 1.5 + }, + "id": "gpt-3.5-turbo", + "knowledge": "2021-09-01", + "last_updated": "2023-11-06", + "limit": { + "context": 16385, + "output": 4096 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GPT-3.5-turbo", + "open_weights": false, + "reasoning": false, + "release_date": "2023-03-01", + "structured_output": false, + "temperature": true, + "tool_call": false + }, + "gpt-4": { + "attachment": true, + "cost": { + "input": 30, + "output": 60 + }, + "id": "gpt-4", + "knowledge": "2023-11", + "last_updated": "2024-04-09", + "limit": { + "context": 8192, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "GPT-4", + "open_weights": false, + "reasoning": false, + "release_date": "2023-11-06", + "structured_output": false, + "temperature": true, + "tool_call": true + }, + "gpt-4-turbo": { + "attachment": true, + "cost": { + "input": 10, + "output": 30 + }, + "id": "gpt-4-turbo", + "knowledge": "2023-12", + "last_updated": "2024-04-09", + "limit": { + "context": 128000, + "output": 4096 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-4 Turbo", + "open_weights": false, + "reasoning": false, + "release_date": "2023-11-06", + "structured_output": false, + "temperature": true, + "tool_call": true + }, + "gpt-4.1": { + "attachment": true, + "cost": { + "cache_read": 0.5, + "input": 2, + "output": 8 + }, + "id": "gpt-4.1", + "knowledge": "2024-04", + "last_updated": "2025-04-14", + "limit": { + "context": 1047576, + "output": 32768 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-4.1", + "open_weights": false, + "reasoning": false, + "release_date": "2025-04-14", + "structured_output": true, + "temperature": true, + "tool_call": true + }, + "gpt-4.1-mini": { + "attachment": true, + "cost": { + "cache_read": 0.1, + "input": 0.4, + "output": 1.6 + }, + "id": "gpt-4.1-mini", + "knowledge": "2024-04", + "last_updated": "2025-04-14", + "limit": { + "context": 1047576, + "output": 32768 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-4.1 mini", + "open_weights": false, + "reasoning": false, + "release_date": "2025-04-14", + "structured_output": true, + "temperature": true, + "tool_call": true + }, + "gpt-4.1-nano": { + "attachment": true, + "cost": { + "cache_read": 0.03, + "input": 0.1, + "output": 0.4 + }, + "id": "gpt-4.1-nano", + "knowledge": "2024-04", + "last_updated": "2025-04-14", + "limit": { + "context": 1047576, + "output": 32768 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-4.1 nano", + "open_weights": false, + "reasoning": false, + "release_date": "2025-04-14", + "structured_output": true, + "temperature": true, + "tool_call": true + }, + "gpt-4o": { + "attachment": true, + "cost": { + "cache_read": 1.25, + "input": 2.5, + "output": 10 + }, + "id": "gpt-4o", + "knowledge": "2023-09", + "last_updated": "2024-08-06", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-4o", + "open_weights": false, + "reasoning": false, + "release_date": "2024-05-13", + "structured_output": true, + "temperature": true, + "tool_call": true + }, + "gpt-4o-2024-05-13": { + "attachment": true, + "cost": { + "input": 5, + "output": 15 + }, + "id": "gpt-4o-2024-05-13", + "knowledge": "2023-09", + "last_updated": "2024-05-13", + "limit": { + "context": 128000, + "output": 4096 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-4o (2024-05-13)", + "open_weights": false, + "reasoning": false, + "release_date": "2024-05-13", + "structured_output": true, + "temperature": true, + "tool_call": true + }, + "gpt-4o-2024-08-06": { + "attachment": true, + "cost": { + "cache_read": 1.25, + "input": 2.5, + "output": 10 + }, + "id": "gpt-4o-2024-08-06", + "knowledge": "2023-09", + "last_updated": "2024-08-06", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-4o (2024-08-06)", + "open_weights": false, + "reasoning": false, + "release_date": "2024-08-06", + "structured_output": true, + "temperature": true, + "tool_call": true + }, + "gpt-4o-2024-11-20": { + "attachment": true, + "cost": { + "cache_read": 1.25, + "input": 2.5, + "output": 10 + }, + "id": "gpt-4o-2024-11-20", + "knowledge": "2023-09", + "last_updated": "2024-11-20", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-4o (2024-11-20)", + "open_weights": false, + "reasoning": false, + "release_date": "2024-11-20", + "structured_output": true, + "temperature": true, + "tool_call": true + }, + "gpt-4o-mini": { + "attachment": true, + "cost": { + "cache_read": 0.08, + "input": 0.15, + "output": 0.6 + }, + "id": "gpt-4o-mini", + "knowledge": "2023-09", + "last_updated": "2024-07-18", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-4o mini", + "open_weights": false, + "reasoning": false, + "release_date": "2024-07-18", + "structured_output": true, + "temperature": true, + "tool_call": true + }, + "gpt-5": { + "attachment": true, + "cost": { + "cache_read": 0.13, + "input": 1.25, + "output": 10 + }, + "id": "gpt-5", + "knowledge": "2024-09-30", + "last_updated": "2025-08-07", + "limit": { + "context": 400000, + "output": 128000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-5", + "open_weights": false, + "reasoning": true, + "release_date": "2025-08-07", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "gpt-5-chat-latest": { + "attachment": true, + "cost": { + "input": 1.25, + "output": 10 + }, + "id": "gpt-5-chat-latest", + "knowledge": "2024-09-30", + "last_updated": "2025-08-07", + "limit": { + "context": 400000, + "output": 128000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-5 Chat (latest)", + "open_weights": false, + "reasoning": true, + "release_date": "2025-08-07", + "structured_output": true, + "temperature": true, + "tool_call": false + }, + "gpt-5-codex": { + "attachment": false, + "cost": { + "cache_read": 0.125, + "input": 1.25, + "output": 10 + }, + "id": "gpt-5-codex", + "knowledge": "2024-09-30", + "last_updated": "2025-09-15", + "limit": { + "context": 400000, + "output": 128000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-5-Codex", + "open_weights": false, + "reasoning": true, + "release_date": "2025-09-15", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "gpt-5-mini": { + "attachment": true, + "cost": { + "cache_read": 0.03, + "input": 0.25, + "output": 2 + }, + "id": "gpt-5-mini", + "knowledge": "2024-05-30", + "last_updated": "2025-08-07", + "limit": { + "context": 400000, + "output": 128000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-5 Mini", + "open_weights": false, + "reasoning": true, + "release_date": "2025-08-07", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "gpt-5-nano": { + "attachment": true, + "cost": { + "cache_read": 0.01, + "input": 0.05, + "output": 0.4 + }, + "id": "gpt-5-nano", + "knowledge": "2024-05-30", + "last_updated": "2025-08-07", + "limit": { + "context": 400000, + "output": 128000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-5 Nano", + "open_weights": false, + "reasoning": true, + "release_date": "2025-08-07", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "gpt-5-pro": { + "attachment": true, + "cost": { + "input": 15, + "output": 120 + }, + "id": "gpt-5-pro", + "knowledge": "2024-09-30", + "last_updated": "2025-10-06", + "limit": { + "context": 400000, + "output": 272000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-5 Pro", + "open_weights": false, + "reasoning": true, + "release_date": "2025-10-06", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "gpt-5.1": { + "attachment": true, + "cost": { + "cache_read": 0.13, + "input": 1.25, + "output": 10 + }, + "id": "gpt-5.1", + "knowledge": "2024-09-30", + "last_updated": "2025-11-13", + "limit": { + "context": 400000, + "output": 128000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-5.1", + "open_weights": false, + "reasoning": true, + "release_date": "2025-11-13", + "temperature": false, + "tool_call": true + }, + "gpt-5.1-chat-latest": { + "attachment": true, + "cost": { + "cache_read": 0.125, + "input": 1.25, + "output": 10 + }, + "id": "gpt-5.1-chat-latest", + "knowledge": "2024-09-30", + "last_updated": "2025-11-13", + "limit": { + "context": 128000, + "output": 16384 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "GPT-5.1 Chat", + "open_weights": false, + "reasoning": true, + "release_date": "2025-11-13", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "gpt-5.1-codex": { + "attachment": true, + "cost": { + "cache_read": 0.125, + "input": 1.25, + "output": 10 + }, + "id": "gpt-5.1-codex", + "knowledge": "2024-09-30", + "last_updated": "2025-11-13", + "limit": { + "context": 400000, + "output": 128000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text", + "image" + ] + }, + "name": "GPT-5.1 Codex", + "open_weights": false, + "reasoning": true, + "release_date": "2025-11-13", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "gpt-5.1-codex-mini": { + "attachment": true, + "cost": { + "cache_read": 0.025, + "input": 0.25, + "output": 2 + }, + "id": "gpt-5.1-codex-mini", + "knowledge": "2024-09-30", + "last_updated": "2025-11-13", + "limit": { + "context": 400000, + "output": 128000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text", + "image" + ] + }, + "name": "GPT-5.1 Codex mini", + "open_weights": false, + "reasoning": true, + "release_date": "2025-11-13", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "o1": { + "attachment": true, + "cost": { + "cache_read": 7.5, + "input": 15, + "output": 60 + }, + "id": "o1", + "knowledge": "2023-09", + "last_updated": "2024-12-05", + "limit": { + "context": 200000, + "output": 100000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "o1", + "open_weights": false, + "reasoning": true, + "release_date": "2024-12-05", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "o1-mini": { + "attachment": false, + "cost": { + "cache_read": 0.55, + "input": 1.1, + "output": 4.4 + }, + "id": "o1-mini", + "knowledge": "2023-09", + "last_updated": "2024-09-12", + "limit": { + "context": 128000, + "output": 65536 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "o1-mini", + "open_weights": false, + "reasoning": true, + "release_date": "2024-09-12", + "structured_output": true, + "temperature": false, + "tool_call": false + }, + "o1-preview": { + "attachment": false, + "cost": { + "cache_read": 7.5, + "input": 15, + "output": 60 + }, + "id": "o1-preview", + "knowledge": "2023-09", + "last_updated": "2024-09-12", + "limit": { + "context": 128000, + "output": 32768 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "o1-preview", + "open_weights": false, + "reasoning": true, + "release_date": "2024-09-12", + "temperature": true, + "tool_call": false + }, + "o1-pro": { + "attachment": true, + "cost": { + "input": 150, + "output": 600 + }, + "id": "o1-pro", + "knowledge": "2023-09", + "last_updated": "2025-03-19", + "limit": { + "context": 200000, + "output": 100000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "o1-pro", + "open_weights": false, + "reasoning": true, + "release_date": "2025-03-19", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "o3": { + "attachment": true, + "cost": { + "cache_read": 0.5, + "input": 2, + "output": 8 + }, + "id": "o3", + "knowledge": "2024-05", + "last_updated": "2025-04-16", + "limit": { + "context": 200000, + "output": 100000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "o3", + "open_weights": false, + "reasoning": true, + "release_date": "2025-04-16", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "o3-deep-research": { + "attachment": true, + "cost": { + "cache_read": 2.5, + "input": 10, + "output": 40 + }, + "id": "o3-deep-research", + "knowledge": "2024-05", + "last_updated": "2024-06-26", + "limit": { + "context": 200000, + "output": 100000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "o3-deep-research", + "open_weights": false, + "reasoning": true, + "release_date": "2024-06-26", + "temperature": false, + "tool_call": true + }, + "o3-mini": { + "attachment": false, + "cost": { + "cache_read": 0.55, + "input": 1.1, + "output": 4.4 + }, + "id": "o3-mini", + "knowledge": "2024-05", + "last_updated": "2025-01-29", + "limit": { + "context": 200000, + "output": 100000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "o3-mini", + "open_weights": false, + "reasoning": true, + "release_date": "2024-12-20", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "o3-pro": { + "attachment": true, + "cost": { + "input": 20, + "output": 80 + }, + "id": "o3-pro", + "knowledge": "2024-05", + "last_updated": "2025-06-10", + "limit": { + "context": 200000, + "output": 100000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "o3-pro", + "open_weights": false, + "reasoning": true, + "release_date": "2025-06-10", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "o4-mini": { + "attachment": true, + "cost": { + "cache_read": 0.28, + "input": 1.1, + "output": 4.4 + }, + "id": "o4-mini", + "knowledge": "2024-05", + "last_updated": "2025-04-16", + "limit": { + "context": 200000, + "output": 100000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "o4-mini", + "open_weights": false, + "reasoning": true, + "release_date": "2025-04-16", + "structured_output": true, + "temperature": false, + "tool_call": true + }, + "o4-mini-deep-research": { + "attachment": true, + "cost": { + "cache_read": 0.5, + "input": 2, + "output": 8 + }, + "id": "o4-mini-deep-research", + "knowledge": "2024-05", + "last_updated": "2024-06-26", + "limit": { + "context": 200000, + "output": 100000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "o4-mini-deep-research", + "open_weights": false, + "reasoning": true, + "release_date": "2024-06-26", + "temperature": false, + "tool_call": true + }, + "text-embedding-3-large": { + "attachment": false, + "cost": { + "input": 0.13, + "output": 0 + }, + "id": "text-embedding-3-large", + "knowledge": "2024-01", + "last_updated": "2024-01-25", + "limit": { + "context": 8191, + "output": 3072 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "text-embedding-3-large", + "open_weights": false, + "reasoning": false, + "release_date": "2024-01-25", + "temperature": false, + "tool_call": false + }, + "text-embedding-3-small": { + "attachment": false, + "cost": { + "input": 0.02, + "output": 0 + }, + "id": "text-embedding-3-small", + "knowledge": "2024-01", + "last_updated": "2024-01-25", + "limit": { + "context": 8191, + "output": 1536 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "text-embedding-3-small", + "open_weights": false, + "reasoning": false, + "release_date": "2024-01-25", + "temperature": false, + "tool_call": false + }, + "text-embedding-ada-002": { + "attachment": false, + "cost": { + "input": 0.1, + "output": 0 + }, + "id": "text-embedding-ada-002", + "knowledge": "2022-12", + "last_updated": "2022-12-15", + "limit": { + "context": 8192, + "output": 1536 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "text-embedding-ada-002", + "open_weights": false, + "reasoning": false, + "release_date": "2022-12-15", + "temperature": false, + "tool_call": false + } + }, + "name": "OpenAI", + "npm": "@ai-sdk/openai" + } +} \ No newline at end of file diff --git a/libs/partners/openai/langchain_openai/data/profile_augmentations.toml b/libs/partners/openai/langchain_openai/data/profile_augmentations.toml new file mode 100644 index 0000000000000..762221f33de5d --- /dev/null +++ b/libs/partners/openai/langchain_openai/data/profile_augmentations.toml @@ -0,0 +1,14 @@ +provider = "openai" + +[overrides] +image_url_inputs = true +pdf_inputs = true +pdf_tool_message = true +image_tool_message = true +tool_choice = true + +[overrides."gpt-3.5-turbo"] +image_url_inputs = false +pdf_inputs = false +pdf_tool_message = false +image_tool_message = false diff --git a/libs/partners/openai/tests/unit_tests/chat_models/test_base.py b/libs/partners/openai/tests/unit_tests/chat_models/test_base.py index 9dd15931c4d72..b09a8b93b6ee9 100644 --- a/libs/partners/openai/tests/unit_tests/chat_models/test_base.py +++ b/libs/partners/openai/tests/unit_tests/chat_models/test_base.py @@ -120,6 +120,30 @@ def test_openai_client_caching() -> None: assert llm1.root_client._client is not llm7.root_client._client +def test_profile() -> None: + model = ChatOpenAI(model="gpt-4") + assert model.profile + assert not model.profile["structured_output"] + + model = ChatOpenAI(model="gpt-5") + assert model.profile + assert model.profile["structured_output"] + assert model.profile["tool_calling"] + + # Test overwriting a field + model.profile["tool_calling"] = False + assert not model.profile["tool_calling"] + + # Test we didn't mutate + model = ChatOpenAI(model="gpt-5") + assert model.profile + assert model.profile["tool_calling"] + + # Test passing in profile + model = ChatOpenAI(model="gpt-5", profile={"tool_calling": False}) + assert model.profile == {"tool_calling": False} + + def test_openai_o1_temperature() -> None: llm = ChatOpenAI(model="o1-preview") assert llm.temperature == 1 diff --git a/libs/partners/perplexity/langchain_perplexity/chat_models.py b/libs/partners/perplexity/langchain_perplexity/chat_models.py index eee0bba41d403..1bbb2b2e507d3 100644 --- a/libs/partners/perplexity/langchain_perplexity/chat_models.py +++ b/libs/partners/perplexity/langchain_perplexity/chat_models.py @@ -5,7 +5,8 @@ import logging from collections.abc import Iterator, Mapping from operator import itemgetter -from typing import Any, Literal, TypeAlias +from pathlib import Path +from typing import Any, Literal, TypeAlias, cast import openai from langchain_core.callbacks import CallbackManagerForLLMRun @@ -14,6 +15,10 @@ BaseChatModel, generate_from_stream, ) +from langchain_core.language_models.profile import ModelProfile, ModelProfileRegistry +from langchain_core.language_models.profile._loader_utils import ( + load_profiles_from_data_dir, +) from langchain_core.messages import ( AIMessage, AIMessageChunk, @@ -52,6 +57,17 @@ logger = logging.getLogger(__name__) +_MODEL_PROFILES = cast( + "ModelProfileRegistry", + load_profiles_from_data_dir(Path(__file__).parent / "data", "perplexity"), +) + + +def _get_default_model_profile(model_name: str) -> ModelProfile: + default = _MODEL_PROFILES.get(model_name) or {} + return default.copy() + + def _is_pydantic_class(obj: Any) -> bool: return isinstance(obj, type) and is_basemodel_subclass(obj) @@ -249,6 +265,13 @@ def validate_environment(self) -> Self: ) return self + @model_validator(mode="after") + def _set_model_profile(self) -> Self: + """Set model profile if not overridden.""" + if self.profile is None: + self.profile = _get_default_model_profile(self.model) + return self + @property def _default_params(self) -> dict[str, Any]: """Get the default parameters for calling PerplexityChat API.""" diff --git a/libs/partners/perplexity/langchain_perplexity/data/models.json b/libs/partners/perplexity/langchain_perplexity/data/models.json new file mode 100644 index 0000000000000..baa00a9f2a87a --- /dev/null +++ b/libs/partners/perplexity/langchain_perplexity/data/models.json @@ -0,0 +1,127 @@ +{ + "perplexity": { + "doc": "https://docs.perplexity.ai", + "env": [ + "PERPLEXITY_API_KEY" + ], + "id": "perplexity", + "models": { + "sonar": { + "attachment": false, + "cost": { + "input": 1, + "output": 1 + }, + "id": "sonar", + "knowledge": "2025-09-01", + "last_updated": "2025-09-01", + "limit": { + "context": 128000, + "output": 4096 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Sonar", + "open_weights": false, + "reasoning": false, + "release_date": "2024-01-01", + "temperature": true, + "tool_call": false + }, + "sonar-pro": { + "attachment": true, + "cost": { + "input": 3, + "output": 15 + }, + "id": "sonar-pro", + "knowledge": "2025-09-01", + "last_updated": "2025-09-01", + "limit": { + "context": 200000, + "output": 8192 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Sonar Pro", + "open_weights": false, + "reasoning": false, + "release_date": "2024-01-01", + "temperature": true, + "tool_call": false + }, + "sonar-reasoning": { + "attachment": false, + "cost": { + "input": 1, + "output": 5 + }, + "id": "sonar-reasoning", + "knowledge": "2025-09-01", + "last_updated": "2025-09-01", + "limit": { + "context": 128000, + "output": 4096 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Sonar Reasoning", + "open_weights": false, + "reasoning": true, + "release_date": "2024-01-01", + "temperature": true, + "tool_call": false + }, + "sonar-reasoning-pro": { + "attachment": true, + "cost": { + "input": 2, + "output": 8 + }, + "id": "sonar-reasoning-pro", + "knowledge": "2025-09-01", + "last_updated": "2025-09-01", + "limit": { + "context": 128000, + "output": 4096 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Sonar Reasoning Pro", + "open_weights": false, + "reasoning": true, + "release_date": "2024-01-01", + "temperature": true, + "tool_call": false + } + }, + "name": "Perplexity", + "npm": "@ai-sdk/perplexity" + } +} \ No newline at end of file diff --git a/libs/partners/perplexity/tests/unit_tests/test_chat_models.py b/libs/partners/perplexity/tests/unit_tests/test_chat_models.py index 4fc7f08611bfc..2d2e738470c66 100644 --- a/libs/partners/perplexity/tests/unit_tests/test_chat_models.py +++ b/libs/partners/perplexity/tests/unit_tests/test_chat_models.py @@ -523,3 +523,8 @@ def test_perplexity_stream_includes_num_search_queries(mocker: MockerFixture) -> assert usage_chunk.usage_metadata["output_token_details"]["citation_tokens"] == 3 # type: ignore[typeddict-item] patcher.assert_called_once() + + +def test_profile() -> None: + model = ChatPerplexity(model="sonar") + assert model.profile diff --git a/libs/partners/xai/langchain_xai/chat_models.py b/libs/partners/xai/langchain_xai/chat_models.py index c407bbfd73064..aae0c83ab25e8 100644 --- a/libs/partners/xai/langchain_xai/chat_models.py +++ b/libs/partners/xai/langchain_xai/chat_models.py @@ -2,9 +2,13 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Literal, TypeAlias +from pathlib import Path +from typing import TYPE_CHECKING, Any, Literal, TypeAlias, cast import openai +from langchain_core.language_models.profile._loader_utils import ( + load_profiles_from_data_dir, +) from langchain_core.messages import AIMessageChunk from langchain_core.utils import secret_from_env from langchain_openai.chat_models.base import BaseChatOpenAI @@ -16,6 +20,10 @@ LangSmithParams, LanguageModelInput, ) + from langchain_core.language_models.profile import ( + ModelProfile, + ModelProfileRegistry, + ) from langchain_core.outputs import ChatGenerationChunk, ChatResult from langchain_core.runnables import Runnable @@ -23,6 +31,17 @@ _DictOrPydantic: TypeAlias = dict | BaseModel +_MODEL_PROFILES = cast( + "ModelProfileRegistry", + load_profiles_from_data_dir(Path(__file__).parent / "data", "xai"), +) + + +def _get_default_model_profile(model_name: str) -> ModelProfile: + default = _MODEL_PROFILES.get(model_name) or {} + return default.copy() + + class ChatXAI(BaseChatOpenAI): # type: ignore[override] r"""ChatXAI chat model. @@ -514,6 +533,13 @@ def validate_environment(self) -> Self: ) return self + @model_validator(mode="after") + def _set_model_profile(self) -> Self: + """Set model profile if not overridden.""" + if self.profile is None: + self.profile = _get_default_model_profile(self.model_name) + return self + @property def _default_params(self) -> dict[str, Any]: """Get default parameters.""" diff --git a/libs/partners/xai/langchain_xai/data/models.json b/libs/partners/xai/langchain_xai/data/models.json new file mode 100644 index 0000000000000..46584f9c28a66 --- /dev/null +++ b/libs/partners/xai/langchain_xai/data/models.json @@ -0,0 +1,664 @@ +{ + "xai": { + "doc": "https://docs.x.ai/docs/models", + "env": [ + "XAI_API_KEY" + ], + "id": "xai", + "models": { + "grok-2": { + "attachment": false, + "cost": { + "cache_read": 2, + "input": 2, + "output": 10 + }, + "id": "grok-2", + "knowledge": "2024-08", + "last_updated": "2024-08-20", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 2", + "open_weights": false, + "reasoning": false, + "release_date": "2024-08-20", + "temperature": true, + "tool_call": true + }, + "grok-2-1212": { + "attachment": false, + "cost": { + "cache_read": 2, + "input": 2, + "output": 10 + }, + "id": "grok-2-1212", + "knowledge": "2024-08", + "last_updated": "2024-12-12", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 2 (1212)", + "open_weights": false, + "reasoning": false, + "release_date": "2024-12-12", + "temperature": true, + "tool_call": true + }, + "grok-2-latest": { + "attachment": false, + "cost": { + "cache_read": 2, + "input": 2, + "output": 10 + }, + "id": "grok-2-latest", + "knowledge": "2024-08", + "last_updated": "2024-12-12", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 2 Latest", + "open_weights": false, + "reasoning": false, + "release_date": "2024-08-20", + "temperature": true, + "tool_call": true + }, + "grok-2-vision": { + "attachment": true, + "cost": { + "cache_read": 2, + "input": 2, + "output": 10 + }, + "id": "grok-2-vision", + "knowledge": "2024-08", + "last_updated": "2024-08-20", + "limit": { + "context": 8192, + "output": 4096 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Grok 2 Vision", + "open_weights": false, + "reasoning": false, + "release_date": "2024-08-20", + "temperature": true, + "tool_call": true + }, + "grok-2-vision-1212": { + "attachment": true, + "cost": { + "cache_read": 2, + "input": 2, + "output": 10 + }, + "id": "grok-2-vision-1212", + "knowledge": "2024-08", + "last_updated": "2024-12-12", + "limit": { + "context": 8192, + "output": 4096 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Grok 2 Vision (1212)", + "open_weights": false, + "reasoning": false, + "release_date": "2024-08-20", + "temperature": true, + "tool_call": true + }, + "grok-2-vision-latest": { + "attachment": true, + "cost": { + "cache_read": 2, + "input": 2, + "output": 10 + }, + "id": "grok-2-vision-latest", + "knowledge": "2024-08", + "last_updated": "2024-12-12", + "limit": { + "context": 8192, + "output": 4096 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Grok 2 Vision Latest", + "open_weights": false, + "reasoning": false, + "release_date": "2024-08-20", + "temperature": true, + "tool_call": true + }, + "grok-3": { + "attachment": false, + "cost": { + "cache_read": 0.75, + "input": 3, + "output": 15 + }, + "id": "grok-3", + "knowledge": "2024-11", + "last_updated": "2025-02-17", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 3", + "open_weights": false, + "reasoning": false, + "release_date": "2025-02-17", + "temperature": true, + "tool_call": true + }, + "grok-3-fast": { + "attachment": false, + "cost": { + "cache_read": 1.25, + "input": 5, + "output": 25 + }, + "id": "grok-3-fast", + "knowledge": "2024-11", + "last_updated": "2025-02-17", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 3 Fast", + "open_weights": false, + "reasoning": false, + "release_date": "2025-02-17", + "temperature": true, + "tool_call": true + }, + "grok-3-fast-latest": { + "attachment": false, + "cost": { + "cache_read": 1.25, + "input": 5, + "output": 25 + }, + "id": "grok-3-fast-latest", + "knowledge": "2024-11", + "last_updated": "2025-02-17", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 3 Fast Latest", + "open_weights": false, + "reasoning": false, + "release_date": "2025-02-17", + "temperature": true, + "tool_call": true + }, + "grok-3-latest": { + "attachment": false, + "cost": { + "cache_read": 0.75, + "input": 3, + "output": 15 + }, + "id": "grok-3-latest", + "knowledge": "2024-11", + "last_updated": "2025-02-17", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 3 Latest", + "open_weights": false, + "reasoning": false, + "release_date": "2025-02-17", + "temperature": true, + "tool_call": true + }, + "grok-3-mini": { + "attachment": false, + "cost": { + "cache_read": 0.075, + "input": 0.3, + "output": 0.5, + "reasoning": 0.5 + }, + "id": "grok-3-mini", + "knowledge": "2024-11", + "last_updated": "2025-02-17", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 3 Mini", + "open_weights": false, + "reasoning": true, + "release_date": "2025-02-17", + "temperature": true, + "tool_call": true + }, + "grok-3-mini-fast": { + "attachment": false, + "cost": { + "cache_read": 0.15, + "input": 0.6, + "output": 4, + "reasoning": 4 + }, + "id": "grok-3-mini-fast", + "knowledge": "2024-11", + "last_updated": "2025-02-17", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 3 Mini Fast", + "open_weights": false, + "reasoning": true, + "release_date": "2025-02-17", + "temperature": true, + "tool_call": true + }, + "grok-3-mini-fast-latest": { + "attachment": false, + "cost": { + "cache_read": 0.15, + "input": 0.6, + "output": 4, + "reasoning": 4 + }, + "id": "grok-3-mini-fast-latest", + "knowledge": "2024-11", + "last_updated": "2025-02-17", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 3 Mini Fast Latest", + "open_weights": false, + "reasoning": true, + "release_date": "2025-02-17", + "temperature": true, + "tool_call": true + }, + "grok-3-mini-latest": { + "attachment": false, + "cost": { + "cache_read": 0.075, + "input": 0.3, + "output": 0.5, + "reasoning": 0.5 + }, + "id": "grok-3-mini-latest", + "knowledge": "2024-11", + "last_updated": "2025-02-17", + "limit": { + "context": 131072, + "output": 8192 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 3 Mini Latest", + "open_weights": false, + "reasoning": true, + "release_date": "2025-02-17", + "temperature": true, + "tool_call": true + }, + "grok-4": { + "attachment": false, + "cost": { + "cache_read": 0.75, + "input": 3, + "output": 15, + "reasoning": 15 + }, + "id": "grok-4", + "knowledge": "2025-07", + "last_updated": "2025-07-09", + "limit": { + "context": 256000, + "output": 64000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok 4", + "open_weights": false, + "reasoning": true, + "release_date": "2025-07-09", + "temperature": true, + "tool_call": true + }, + "grok-4-1-fast": { + "attachment": true, + "cost": { + "cache_read": 0.05, + "input": 0.2, + "output": 0.5 + }, + "id": "grok-4-1-fast", + "knowledge": "2025-07", + "last_updated": "2025-11-19", + "limit": { + "context": 2000000, + "output": 30000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Grok 4.1 Fast", + "open_weights": false, + "reasoning": true, + "release_date": "2025-11-19", + "temperature": true, + "tool_call": true + }, + "grok-4-1-fast-non-reasoning": { + "attachment": true, + "cost": { + "cache_read": 0.05, + "input": 0.2, + "output": 0.5 + }, + "id": "grok-4-1-fast-non-reasoning", + "knowledge": "2025-07", + "last_updated": "2025-11-19", + "limit": { + "context": 2000000, + "output": 30000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Grok 4.1 Fast (Non-Reasoning)", + "open_weights": false, + "reasoning": false, + "release_date": "2025-11-19", + "temperature": true, + "tool_call": true + }, + "grok-4-fast": { + "attachment": true, + "cost": { + "cache_read": 0.05, + "input": 0.2, + "output": 0.5 + }, + "id": "grok-4-fast", + "knowledge": "2025-07", + "last_updated": "2025-09-19", + "limit": { + "context": 2000000, + "output": 30000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Grok 4 Fast", + "open_weights": false, + "reasoning": true, + "release_date": "2025-09-19", + "temperature": true, + "tool_call": true + }, + "grok-4-fast-non-reasoning": { + "attachment": true, + "cost": { + "cache_read": 0.05, + "input": 0.2, + "output": 0.5 + }, + "id": "grok-4-fast-non-reasoning", + "knowledge": "2025-07", + "last_updated": "2025-09-19", + "limit": { + "context": 2000000, + "output": 30000 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Grok 4 Fast (Non-Reasoning)", + "open_weights": false, + "reasoning": false, + "release_date": "2025-09-19", + "temperature": true, + "tool_call": true + }, + "grok-beta": { + "attachment": false, + "cost": { + "cache_read": 5, + "input": 5, + "output": 15 + }, + "id": "grok-beta", + "knowledge": "2024-08", + "last_updated": "2024-11-01", + "limit": { + "context": 131072, + "output": 4096 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok Beta", + "open_weights": false, + "reasoning": false, + "release_date": "2024-11-01", + "temperature": true, + "tool_call": true + }, + "grok-code-fast-1": { + "attachment": false, + "cost": { + "cache_read": 0.02, + "input": 0.2, + "output": 1.5 + }, + "id": "grok-code-fast-1", + "knowledge": "2023-10", + "last_updated": "2025-08-28", + "limit": { + "context": 256000, + "output": 10000 + }, + "modalities": { + "input": [ + "text" + ], + "output": [ + "text" + ] + }, + "name": "Grok Code Fast 1", + "open_weights": false, + "reasoning": true, + "release_date": "2025-08-28", + "temperature": true, + "tool_call": true + }, + "grok-vision-beta": { + "attachment": true, + "cost": { + "cache_read": 5, + "input": 5, + "output": 15 + }, + "id": "grok-vision-beta", + "knowledge": "2024-08", + "last_updated": "2024-11-01", + "limit": { + "context": 8192, + "output": 4096 + }, + "modalities": { + "input": [ + "text", + "image" + ], + "output": [ + "text" + ] + }, + "name": "Grok Vision Beta", + "open_weights": false, + "reasoning": false, + "release_date": "2024-11-01", + "temperature": true, + "tool_call": true + } + }, + "name": "xAI", + "npm": "@ai-sdk/xai" + } +} \ No newline at end of file diff --git a/libs/partners/xai/tests/unit_tests/test_chat_models.py b/libs/partners/xai/tests/unit_tests/test_chat_models.py index b2d6fc992cdc6..ee34cc5c7a0da 100644 --- a/libs/partners/xai/tests/unit_tests/test_chat_models.py +++ b/libs/partners/xai/tests/unit_tests/test_chat_models.py @@ -23,6 +23,11 @@ def test_initialization() -> None: ChatXAI(model=MODEL_NAME) +def test_profile() -> None: + model = ChatXAI(model="grok-4") + assert model.profile + + def test_xai_model_param() -> None: llm = ChatXAI(model="foo") assert llm.model_name == "foo"