> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-lginte-1765488813-6406a61.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat models

[Chat models](/oss/python/langchain/models) are language models that use a sequence of [messages](/oss/python/langchain/messages) as inputs and return messages as outputs <Tooltip tip="Older models that do not follow the chat model interface and instead use an interface that takes a string as input and returns a string as output. These models typically do not include the prefix 'Chat' in their name or include 'LLM' as a suffix.">(as opposed to traditional, plaintext LLMs)</Tooltip>.

## Featured models

<Info>
  **While these LangChain classes support the indicated advanced feature**, you may need to refer to provider-specific documentation to learn which hosted models or backends support the feature.
</Info>

| Model                                                                          | [Tool calling](/oss/python/langchain/tools) | [Structured output](/oss/python/langchain/structured-output/) | JSON mode | Local | [Multimodal](/oss/python/langchain/messages#multimodal) |
| ------------------------------------------------------------------------------ | ------------------------------------------- | ------------------------------------------------------------- | --------- | ----- | ------------------------------------------------------- |
| [`ChatAnthropic`](/oss/python/integrations/chat/anthropic)                     | ✅                                           | ✅                                                             | ✅         | ❌     | ✅                                                       |
| [`ChatOpenAI`](/oss/python/integrations/chat/openai)                           | ✅                                           | ✅                                                             | ✅         | ❌     | ✅                                                       |
| [`AzureChatOpenAI`](/oss/python/integrations/chat/azure_chat_openai)           | ✅                                           | ✅                                                             | ✅         | ❌     | ✅                                                       |
| [`ChatVertexAI`](/oss/python/integrations/chat/google_vertex_ai)               | ✅                                           | ✅                                                             | ✅         | ❌     | ✅                                                       |
| [`ChatGoogleGenerativeAI`](/oss/python/integrations/chat/google_generative_ai) | ✅                                           | ✅                                                             | ✅         | ❌     | ✅                                                       |
| [`ChatGroq`](/oss/python/integrations/chat/groq)                               | ✅                                           | ✅                                                             | ✅         | ❌     | ❌                                                       |
| [`ChatBedrock`](/oss/python/integrations/chat/bedrock)                         | ✅                                           | ✅                                                             | ❌         | ❌     | ❌                                                       |
| [`ChatAmazonNova`](/oss/python/integrations/chat/amazon_nova)                  | ✅                                           | ❌                                                             | ❌         | ❌     | ✅                                                       |
| [`ChatHuggingFace`](/oss/python/integrations/chat/huggingface)                 | ✅                                           | ✅                                                             | ❌         | ✅     | ❌                                                       |
| [`ChatOllama`](/oss/python/integrations/chat/ollama)                           | ✅                                           | ✅                                                             | ✅         | ✅     | ❌                                                       |
| [`ChatWatsonx`](/oss/python/integrations/chat/ibm_watsonx)                     | ✅                                           | ✅                                                             | ✅         | ❌     | ✅                                                       |
| [`ChatXAI`](/oss/python/integrations/chat/xai)                                 | ✅                                           | ✅                                                             | ❌         | ❌     | ❌                                                       |
| [`ChatNVIDIA`](/oss/python/integrations/chat/nvidia_ai_endpoints)              | ✅                                           | ✅                                                             | ✅         | ✅     | ✅                                                       |
| [`ChatCohere`](/oss/python/integrations/chat/cohere)                           | ✅                                           | ✅                                                             | ❌         | ❌     | ❌                                                       |
| [`ChatMistralAI`](/oss/python/integrations/chat/mistralai)                     | ✅                                           | ✅                                                             | ❌         | ❌     | ❌                                                       |
| [`ChatTogether`](/oss/python/integrations/chat/together)                       | ✅                                           | ✅                                                             | ✅         | ❌     | ❌                                                       |
| [`ChatFireworks`](/oss/python/integrations/chat/fireworks)                     | ✅                                           | ✅                                                             | ✅         | ❌     | ❌                                                       |
| [`ChatLlamaCpp`](/oss/python/integrations/chat/llamacpp)                       | ✅                                           | ✅                                                             | ❌         | ✅     | ❌                                                       |
| [`ChatDatabricks`](/oss/python/integrations/chat/databricks)                   | ✅                                           | ✅                                                             | ❌         | ❌     | ❌                                                       |
| [`ChatPerplexity`](/oss/python/integrations/chat/perplexity)                   | ❌                                           | ✅                                                             | ✅         | ❌     | ✅                                                       |

## Chat Completions API

Certain model providers offer endpoints that are compatible with OpenAI's (legacy) [Chat Completions API](https://platform.openai.com/docs/guides/completions). In such case, you can use [`ChatOpenAI`](/oss/python/integrations/chat/openai) with a custom `base_url` to connect to these endpoints. Note that features built on top of the Chat Completions API may not be fully supported by `ChatOpenAI`; in such cases, consider using a provider-specific class if available (e.g. [`ChatLiteLLM`](https://github.com/Akshay-Dongare/langchain-litellm/) (community-maintained) for [LiteLLM](https://litellm.ai/)).

<Accordion title="Example: OpenRouter">
  To use OpenRouter, you will need to sign up for an account and obtain an [API key](https://openrouter.ai/docs/api-reference/authentication).

  ```python theme={null}
  from langchain_openai import ChatOpenAI

  model = ChatOpenAI(
      model="...",  # Specify a model available on OpenRouter
      api_key="OPENROUTER_API_KEY",
      base_url="https://openrouter.ai/api/v1",
  )
  ```

  Refer to the [OpenRouter documentation](https://openrouter.ai/docs/quickstart) for more details.

  <Note>
    To capture [reasoning tokens](https://openrouter.ai/docs/use-cases/reasoning-tokens),

    1. Switch imports from `langchain_openai` to `langchain_deepseek`
    2. Use `ChatDeepSeek` instead of `ChatOpenAI`. You will need to change param `base_url` to `api_base`.
    3. Adjust reasoning parameters as needed under `extra_body`, e.g.:

    ```python theme={null}
    model = ChatDeepSeek(
        model="...",
        api_key="...",
        api_base="https://openrouter.ai/api/v1",
        extra_body={"reasoning": {"enabled": True}},
    )
    ```

    This is a known limitation with `ChatOpenAI` and will be addressed in a future release.
  </Note>
</Accordion>

## All chat models

<Columns cols={3}>
  <Card title="Abso" icon="link" href="/oss/python/integrations/chat/abso" arrow="true" cta="View guide" />

  <Card title="AI21 Labs" icon="link" href="/oss/python/integrations/chat/ai21" arrow="true" cta="View guide" />

  <Card title="AI/ML API" icon="link" href="/oss/python/integrations/chat/aimlapi" arrow="true" cta="View guide" />

  <Card title="Alibaba Cloud PAI EAS" icon="link" href="/oss/python/integrations/chat/alibaba_cloud_pai_eas" arrow="true" cta="View guide" />

  <Card title="Amazon Nova" icon="link" href="/oss/python/integrations/chat/amazon_nova" arrow="true" cta="View guide" />

  <Card title="Anthropic" icon="link" href="/oss/python/integrations/chat/anthropic" arrow="true" cta="View guide" />

  <Card title="AzureAIChatCompletionsModel" icon="link" href="/oss/python/integrations/chat/azure_ai" arrow="true" cta="View guide" />

  <Card title="Azure OpenAI" icon="link" href="/oss/python/integrations/chat/azure_chat_openai" arrow="true" cta="View guide" />

  <Card title="Azure ML Endpoint" icon="link" href="/oss/python/integrations/chat/azureml_chat_endpoint" arrow="true" cta="View guide" />

  <Card title="Baichuan Chat" icon="link" href="/oss/python/integrations/chat/baichuan" arrow="true" cta="View guide" />

  <Card title="Baidu Qianfan" icon="link" href="/oss/python/integrations/chat/baidu_qianfan_endpoint" arrow="true" cta="View guide" />

  <Card title="Baseten" icon="link" href="/oss/python/integrations/chat/baseten" arrow="true" cta="View guide" />

  <Card title="AWS Bedrock" icon="link" href="/oss/python/integrations/chat/bedrock" arrow="true" cta="View guide" />

  <Card title="Cerebras" icon="link" href="/oss/python/integrations/chat/cerebras" arrow="true" cta="View guide" />

  <Card title="CloudflareWorkersAI" icon="link" href="/oss/python/integrations/chat/cloudflare_workersai" arrow="true" cta="View guide" />

  <Card title="Cohere" icon="link" href="/oss/python/integrations/chat/cohere" arrow="true" cta="View guide" />

  <Card title="ContextualAI" icon="link" href="/oss/python/integrations/chat/contextual" arrow="true" cta="View guide" />

  <Card title="Coze Chat" icon="link" href="/oss/python/integrations/chat/coze" arrow="true" cta="View guide" />

  <Card title="Dappier AI" icon="link" href="/oss/python/integrations/chat/dappier" arrow="true" cta="View guide" />

  <Card title="Databricks" icon="link" href="/oss/python/integrations/chat/databricks" arrow="true" cta="View guide" />

  <Card title="DeepInfra" icon="link" href="/oss/python/integrations/chat/deepinfra" arrow="true" cta="View guide" />

  <Card title="DeepSeek" icon="link" href="/oss/python/integrations/chat/deepseek" arrow="true" cta="View guide" />

  <Card title="Eden AI" icon="link" href="/oss/python/integrations/chat/edenai" arrow="true" cta="View guide" />

  <Card title="EverlyAI" icon="link" href="/oss/python/integrations/chat/everlyai" arrow="true" cta="View guide" />

  <Card title="Featherless AI" icon="link" href="/oss/python/integrations/chat/featherless_ai" arrow="true" cta="View guide" />

  <Card title="Fireworks" icon="link" href="/oss/python/integrations/chat/fireworks" arrow="true" cta="View guide" />

  <Card title="ChatFriendli" icon="link" href="/oss/python/integrations/chat/friendli" arrow="true" cta="View guide" />

  <Card title="Google Gemini" icon="link" href="/oss/python/integrations/chat/google_generative_ai" arrow="true" cta="View guide" />

  <Card title="Google Cloud Vertex AI" icon="link" href="/oss/python/integrations/chat/google_vertex_ai" arrow="true" cta="View guide" />

  <Card title="GPTRouter" icon="link" href="/oss/python/integrations/chat/gpt_router" arrow="true" cta="View guide" />

  <Card title="DigitalOcean Gradient" icon="link" href="/oss/python/integrations/chat/gradientai" arrow="true" cta="View guide" />

  <Card title="GreenNode" icon="link" href="/oss/python/integrations/chat/greennode" arrow="true" cta="View guide" />

  <Card title="Groq" icon="link" href="/oss/python/integrations/chat/groq" arrow="true" cta="View guide" />

  <Card title="ChatHuggingFace" icon="link" href="/oss/python/integrations/chat/huggingface" arrow="true" cta="View guide" />

  <Card title="IBM watsonx.ai" icon="link" href="/oss/python/integrations/chat/ibm_watsonx" arrow="true" cta="View guide" />

  <Card title="JinaChat" icon="link" href="/oss/python/integrations/chat/jinachat" arrow="true" cta="View guide" />

  <Card title="Kinetica" icon="link" href="/oss/python/integrations/chat/kinetica" arrow="true" cta="View guide" />

  <Card title="Konko" icon="link" href="/oss/python/integrations/chat/konko" arrow="true" cta="View guide" />

  <Card title="LiteLLM" icon="link" href="/oss/python/integrations/chat/litellm" arrow="true" cta="View guide" />

  <Card title="Llama 2 Chat" icon="link" href="/oss/python/integrations/chat/llama2_chat" arrow="true" cta="View guide" />

  <Card title="Llama API" icon="link" href="/oss/python/integrations/chat/llama_api" arrow="true" cta="View guide" />

  <Card title="LlamaEdge" icon="link" href="/oss/python/integrations/chat/llama_edge" arrow="true" cta="View guide" />

  <Card title="Llama.cpp" icon="link" href="/oss/python/integrations/chat/llamacpp" arrow="true" cta="View guide" />

  <Card title="maritalk" icon="link" href="/oss/python/integrations/chat/maritalk" arrow="true" cta="View guide" />

  <Card title="MiniMax" icon="link" href="/oss/python/integrations/chat/minimax" arrow="true" cta="View guide" />

  <Card title="MistralAI" icon="link" href="/oss/python/integrations/chat/mistralai" arrow="true" cta="View guide" />

  <Card title="MLX" icon="link" href="/oss/python/integrations/chat/mlx" arrow="true" cta="View guide" />

  <Card title="ModelScope" icon="link" href="/oss/python/integrations/chat/modelscope_chat_endpoint" arrow="true" cta="View guide" />

  <Card title="Moonshot" icon="link" href="/oss/python/integrations/chat/moonshot" arrow="true" cta="View guide" />

  <Card title="Naver" icon="link" href="/oss/python/integrations/chat/naver" arrow="true" cta="View guide" />

  <Card title="Nebius" icon="link" href="/oss/python/integrations/chat/nebius" arrow="true" cta="View guide" />

  <Card title="Netmind" icon="link" href="/oss/python/integrations/chat/netmind" arrow="true" cta="View guide" />

  <Card title="NVIDIA AI Endpoints" icon="link" href="/oss/python/integrations/chat/nvidia_ai_endpoints" arrow="true" cta="View guide" />

  <Card title="ChatOCIModelDeployment" icon="link" href="/oss/python/integrations/chat/oci_data_science" arrow="true" cta="View guide" />

  <Card title="OCIGenAI" icon="link" href="/oss/python/integrations/chat/oci_generative_ai" arrow="true" cta="View guide" />

  <Card title="ChatOctoAI" icon="link" href="/oss/python/integrations/chat/octoai" arrow="true" cta="View guide" />

  <Card title="Ollama" icon="link" href="/oss/python/integrations/chat/ollama" arrow="true" cta="View guide" />

  <Card title="OpenAI" icon="link" href="/oss/python/integrations/chat/openai" arrow="true" cta="View guide" />

  <Card title="Outlines" icon="link" href="/oss/python/integrations/chat/outlines" arrow="true" cta="View guide" />

  <Card title="Perplexity" icon="link" href="/oss/python/integrations/chat/perplexity" arrow="true" cta="View guide" />

  <Card title="Pipeshift" icon="link" href="/oss/python/integrations/chat/pipeshift" arrow="true" cta="View guide" />

  <Card title="ChatPredictionGuard" icon="link" href="/oss/python/integrations/chat/predictionguard" arrow="true" cta="View guide" />

  <Card title="PremAI" icon="link" href="/oss/python/integrations/chat/premai" arrow="true" cta="View guide" />

  <Card title="PromptLayer ChatOpenAI" icon="link" href="/oss/python/integrations/chat/promptlayer_chatopenai" arrow="true" cta="View guide" />

  <Card title="Qwen QwQ" icon="link" href="/oss/python/integrations/chat/qwq" arrow="true" cta="View guide" />

  <Card title="Qwen" icon="link" href="/oss/python/integrations/chat/qwen" arrow="true" cta="View guide" />

  <Card title="Reka" icon="link" href="/oss/python/integrations/chat/reka" arrow="true" cta="View guide" />

  <Card title="RunPod Chat Model" icon="link" href="/oss/python/integrations/chat/runpod" arrow="true" cta="View guide" />

  <Card title="SambaNova" icon="link" href="/oss/python/integrations/chat/sambanova" arrow="true" cta="View guide" />

  <Card title="ChatSeekrFlow" icon="link" href="/oss/python/integrations/chat/seekrflow" arrow="true" cta="View guide" />

  <Card title="Snowflake Cortex" icon="link" href="/oss/python/integrations/chat/snowflake" arrow="true" cta="View guide" />

  <Card title="SparkLLM Chat" icon="link" href="/oss/python/integrations/chat/sparkllm" arrow="true" cta="View guide" />

  <Card title="Nebula (Symbl.ai)" icon="link" href="/oss/python/integrations/chat/symblai_nebula" arrow="true" cta="View guide" />

  <Card title="Tencent Hunyuan" icon="link" href="/oss/python/integrations/chat/tencent_hunyuan" arrow="true" cta="View guide" />

  <Card title="Together" icon="link" href="/oss/python/integrations/chat/together" arrow="true" cta="View guide" />

  <Card title="Tongyi Qwen" icon="link" href="/oss/python/integrations/chat/tongyi" arrow="true" cta="View guide" />

  <Card title="Upstage" icon="link" href="/oss/python/integrations/chat/upstage" arrow="true" cta="View guide" />

  <Card title="vLLM Chat" icon="link" href="/oss/python/integrations/chat/vllm" arrow="true" cta="View guide" />

  <Card title="Volc Engine Maas" icon="link" href="/oss/python/integrations/chat/volcengine_maas" arrow="true" cta="View guide" />

  <Card title="ChatWriter" icon="link" href="/oss/python/integrations/chat/writer" arrow="true" cta="View guide" />

  <Card title="xAI" icon="link" href="/oss/python/integrations/chat/xai" arrow="true" cta="View guide" />

  <Card title="Xinference" icon="link" href="/oss/python/integrations/chat/xinference" arrow="true" cta="View guide" />

  <Card title="YandexGPT" icon="link" href="/oss/python/integrations/chat/yandex" arrow="true" cta="View guide" />

  <Card title="ChatYI" icon="link" href="/oss/python/integrations/chat/yi" arrow="true" cta="View guide" />

  <Card title="Yuan2.0" icon="link" href="/oss/python/integrations/chat/yuan2" arrow="true" cta="View guide" />

  <Card title="ZHIPU AI" icon="link" href="/oss/python/integrations/chat/zhipuai" arrow="true" cta="View guide" />
</Columns>

<Info>
  If you'd like to contribute an integration, see [Contributing integrations](/oss/python/contributing#add-a-new-integration).
</Info>

***

<Callout icon="pen-to-square" iconType="regular">
  [Edit the source of this page on GitHub.](https://github.com/langchain-ai/docs/edit/main/src/oss/python/integrations/chat/index.mdx)
</Callout>

<Tip icon="terminal" iconType="regular">
  [Connect these docs programmatically](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
</Tip>
