> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-zh.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 模型提供商

[Playground](/langsmith/prompt-engineering-concepts#playground) 支持广泛的模型提供商。您可以选择提供商，配置您偏好的设置，并保存这些配置以便在多个提示中重复使用。

本页面列出了可用的提供商及其配置选项：

<div className="grid grid-cols-1 md:grid-cols-3 gap-3">
  <a href="#amazon-bedrock" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/light/bedrock.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=d3ab4d7af44d4c776de0492bfc837175" alt="" width="65" height="65" data-path="images/providers/light/bedrock.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/bedrock.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=83d0f7653a6471630d014ceaa6580900" alt="" width="65" height="65" data-path="images/providers/dark/bedrock.svg" />

    <span className="font-semibold">Amazon Bedrock</span>
  </a>

  <a href="#anthropic" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/light/anthropic.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=55d21cb007eb79093c5c5322c9e5fff2" alt="" width="65" height="65" data-path="images/providers/light/anthropic.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/anthropic.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=f3297b307ff9526a8894d41399d2fdae" alt="" width="65" height="65" data-path="images/providers/dark/anthropic.svg" />

    <span className="font-semibold">Anthropic</span>
  </a>

  <a href="#azure-openai" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/dGi5Qyx6ZNfUuqyP/images/providers/light/microsoft.svg?fit=max&auto=format&n=dGi5Qyx6ZNfUuqyP&q=85&s=9cd4d9d5fdaf28616fb521c3b89c19c9" alt="" width="65" height="65" data-path="images/providers/light/microsoft.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/microsoft.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=ca8efbc936d455ae5a5d4f088c5ab043" alt="" width="65" height="65" data-path="images/providers/dark/microsoft.svg" />

    <span className="font-semibold">Azure OpenAI</span>
  </a>

  <a href="#deepseek" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/light/deepseek.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=2836d88bf414dd342506ef6a7e3f40cd" alt="" width="65" height="65" data-path="images/providers/light/deepseek.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/deepseek.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=a040afd3d0178aaf7ca01d255c806307" alt="" width="65" height="65" data-path="images/providers/dark/deepseek.svg" />

    <span className="font-semibold">DeepSeek</span>
  </a>

  <a href="#fireworks" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/light/fireworks.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=8a363a02c7055fb87716aac12a473354" alt="" width="65" height="65" data-path="images/providers/light/fireworks.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/fireworks.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=37e7a937191b3c854c0b453f7aeed8f1" alt="" width="65" height="65" data-path="images/providers/dark/fireworks.svg" />

    <span className="font-semibold">Fireworks</span>
  </a>

  <a href="#google-gemini" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/light/gemini.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=6a8c3a40a38892a4de874fdc75151c0b" alt="" width="65" height="65" data-path="images/providers/light/gemini.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/gemini.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=140f5c8e81fc7954b4b1622c6f3ccaf7" alt="" width="65" height="65" data-path="images/providers/dark/gemini.svg" />

    <span className="font-semibold">Google Gemini</span>
  </a>

  <a href="#google-vertex-ai" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/light/gemini.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=6a8c3a40a38892a4de874fdc75151c0b" alt="" width="65" height="65" data-path="images/providers/light/gemini.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/gemini.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=140f5c8e81fc7954b4b1622c6f3ccaf7" alt="" width="65" height="65" data-path="images/providers/dark/gemini.svg" />

    <span className="font-semibold">Google Vertex AI</span>
  </a>

  <a href="#groq" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/dGi5Qyx6ZNfUuqyP/images/providers/light/groq.svg?fit=max&auto=format&n=dGi5Qyx6ZNfUuqyP&q=85&s=7eb6618cfff09a25f8e5f3df5fb1cac0" alt="" width="65" height="65" data-path="images/providers/light/groq.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/groq.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=0e30b151c1e1ca6eb3c5e79a2402b431" alt="" width="65" height="65" data-path="images/providers/dark/groq.svg" />

    <span className="font-semibold">Groq</span>
  </a>

  <a href="#mistral-ai" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/dGi5Qyx6ZNfUuqyP/images/providers/light/mistral.svg?fit=max&auto=format&n=dGi5Qyx6ZNfUuqyP&q=85&s=000ff7d6ca052d8f5547404a5ee66016" alt="" width="65" height="65" data-path="images/providers/light/mistral.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/mistral.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=fbf4f413295bc30e81d656b0391df64c" alt="" width="65" height="65" data-path="images/providers/dark/mistral.svg" />

    <span className="font-semibold">Mistral AI</span>
  </a>

  <a href="#openai" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/dGi5Qyx6ZNfUuqyP/images/providers/light/openai.svg?fit=max&auto=format&n=dGi5Qyx6ZNfUuqyP&q=85&s=9e9a5b3bfabacc5f85135a46d64fb789" alt="" width="65" height="67" data-path="images/providers/light/openai.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/openai.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=4e7ebd80ba3582a58a6c55edf1049cc0" alt="" width="65" height="67" data-path="images/providers/dark/openai.svg" />

    <span className="font-semibold">OpenAI</span>
  </a>

  <a href="#openai-compatible-endpoint" className="flex items-center justify-center gap-2 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <Icon icon="link" iconType="solid" className="w-5 h-5 flex-shrink-0 mx-1" />

    <span className="font-semibold">OpenAI 兼容端点</span>
  </a>

  <a href="#xai" className="flex items-center justify-center gap-1.5 p-2 rounded-lg border border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600 no-underline">
    <img className="block dark:hidden w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/dGi5Qyx6ZNfUuqyP/images/providers/light/xai.svg?fit=max&auto=format&n=dGi5Qyx6ZNfUuqyP&q=85&s=e9f4ab3fb58936c3768e5826d1cb589f" alt="" width="65" height="65" data-path="images/providers/light/xai.svg" />

    <img className="hidden dark:block w-5 h-5" src="https://mintcdn.com/hhh-8c10bf0c/1xJTbE4Z922F2hsr/images/providers/dark/xai.svg?fit=max&auto=format&n=1xJTbE4Z922F2hsr&q=85&s=23a19560d19e0067e57e22b9b5851fee" alt="" width="65" height="65" data-path="images/providers/dark/xai.svg" />

    <span className="font-semibold">XAI</span>
  </a>
</div>

有关创建和管理模型配置的详细信息，请参阅[配置提示设置](/langsmith/managing-model-configurations)页面。

## Amazon Bedrock

使用此模型前，请确保您拥有[AWS 凭证或 IAM 角色](https://docs.aws.amazon.com/bedrock/latest/userguide/security-iam.html)。

### 可用模型

AWS Bedrock 提供对来自多个提供商的基础模型的访问：

* **Anthropic:** Claude 模型。
* **Amazon:** Titan 模型。
* **Cohere:** Command 模型。
* **Meta:** Llama 模型。
* **其他:** 根据区域可用的其他提供商。

有关当前可用模型的列表，请参阅[AWS Bedrock 文档](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html)。

### 配置参数

参数取决于底层模型提供商：

#### 对于 Anthropic 模型

使用 Anthropic 配置（参见上面的 Anthropic 部分）。

#### 对于 Amazon Titan

| 参数              | 范围        | 描述     |
| --------------- | --------- | ------ |
| **Temperature** | 0.0 - 1.0 | 响应随机性  |
| **Max Tokens**  | 1+        | 最大响应长度 |
| **Top P**       | 0.0 - 1.0 | 核心采样   |

#### AWS 特定设置

* **区域:** 模型部署的 AWS 区域。
* **IAM 角色:** 使用基于角色的身份验证而非密钥。

### 工具调用

取决于底层模型：

* **Anthropic 模型:** `auto`, `any`。
* **Cohere 模型:** `auto`。

## Anthropic

使用此模型前，请确保您拥有[Anthropic API 密钥](https://console.anthropic.com/settings/keys)。

### 可用模型

Anthropic 在其 Claude 系列中提供三个级别的模型：

* **Opus:** 最高智能和能力。
* **Sonnet:** 平衡的性能和成本。
* **Haiku:** 快速且经济高效。

最近的 Claude 模型支持扩展思考能力，用于展示推理过程。

有关当前可用模型的列表，请参阅[Anthropic 文档](https://docs.anthropic.com/claude/docs/models-overview)。

### 配置参数

| 参数                    | 范围        | 默认值  | 描述                           |
| --------------------- | --------- | ---- | ---------------------------- |
| **Temperature**       | 0.0 - 1.0 | 可选   | 随机性控制（取消勾选以使用模型默认值）          |
| **Max Output Tokens** | 1+        | 1024 | 最大响应长度                       |
| **Top P**             | 0.0 - 1.0 | 可选   | 核心采样（取消勾选以使用模型默认值）           |
| **Top K**             | 1+        | 可选   | 限制为前 K 个 token（取消勾选以使用模型默认值） |

<Note>
  Temperature、Top P 和 Top K 是可选的。未勾选时，Claude 使用其内部默认值。
</Note>

#### 扩展思考

在支持的 Claude 模型上可用。启用模型在响应前展示推理，类似于 OpenAI 的 o 系列。

| 参数            | 范围 | 描述                     |
| ------------- | -- | ---------------------- |
| **启用扩展思考**    | 切换 | 显示/隐藏思考过程              |
| **预算 Tokens** | 1+ | 思考的最大 token 数（默认：1024） |

启用后，响应包括：

1. 包含模型推理的"思考"部分。
2. 最终响应。

#### 高级选项

* **基础 URL:** 覆盖自定义部署的 API 端点。

### 工具调用

* **支持的工具选择:** `auto`, `any`（需要至少一个工具）。
* **并行执行:** 否（仅顺序执行）。

## Azure OpenAI

使用此模型前，请确保您拥有[Azure OpenAI 凭证](https://learn.microsoft.com/en-us/azure/ai-services/openai/quickstart)（端点 + API 密钥）。

### 可用模型

Azure OpenAI 提供与 OpenAI 相同的模型系列：

* **GPT 系列:** 通用聊天模型。
* **o 系列:** 专注于推理的模型。
* **旧版模型:** GPT-3.5 和 GPT-4 变体。

模型可用性因 Azure 区域而异，并且需要在使用前部署。

有关当前可用模型的列表，请参阅[Azure OpenAI 文档](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models)。

### 配置参数

Azure OpenAI 支持与 OpenAI 相同的参数：

#### 标准参数

| 参数                    | 范围         | 描述                         |
| --------------------- | ---------- | -------------------------- |
| **Temperature**       | 0.0 - 2.0  | 控制随机性。较低 = 更专注，较高 = 更具创造性。 |
| **Max Output Tokens** | 1+         | 响应的最大长度                    |
| **Top P**             | 0.0 - 1.0  | 核心采样阈值。Temperature 的替代方案。  |
| **Presence Penalty**  | -2.0 - 2.0 | 惩罚新主题（正值）或鼓励新主题（负值）        |
| **Frequency Penalty** | -2.0 - 2.0 | 惩罚重复（正值）或允许重复（负值）          |
| **Seed**              | 整数         | 用于可重现的输出                   |

#### 高级参数

**推理努力:** 在推理优化的模型（o 系列和较新的 GPT 模型）上可用。

**服务层级:** 在较新的模型上可用。

**其他参数:**

* **JSON 模式:** 强制有效的 JSON 响应。
* **并行工具调用:** 同时执行多个工具。

#### Azure 特定功能

* **部署管理:** 模型在使用前必须部署。
* **区域可用性:** 为数据驻留选择 Azure 区域。
* **内容过滤:** 内置内容审核和安全功能。
* **托管身份:** Azure AD 身份验证支持。
* **私有端点:** 用于安全访问的 VNet 集成。

### 工具调用

* **支持的工具选择:** `auto`, `required`, `none`，或特定工具名称。
* **并行执行:** 是。

## DeepSeek

使用此模型前，请确保您拥有[DeepSeek API 密钥](https://platform.deepseek.com/api_keys)。

### 可用模型

DeepSeek 提供通用模型、推理优化模型（R 系列）和编码专用模型。

有关当前可用模型的列表，请参阅[DeepSeek 的文档](https://platform.deepseek.com/api-docs/)。

### 配置参数

| 参数                    | 范围         | 描述     |
| --------------------- | ---------- | ------ |
| **Temperature**       | 0.0 - 2.0  | 响应随机性  |
| **Max Tokens**        | 1+         | 最大响应长度 |
| **Top P**             | 0.0 - 1.0  | 核心采样   |
| **Presence Penalty**  | -2.0 - 2.0 |        |
| **Frequency Penalty** | -2.0 - 2.0 |        |

## Fireworks

使用此模型前，请确保您拥有[Fireworks API 密钥](https://fireworks.ai/api-keys)。

### 可用模型

Fireworks 为流行的开源模型和微调变体提供高速推理，包括：

* **Llama:** Meta 的各种尺寸的 Llama 模型。
* **Mixtral:** Mistral 的专家混合模型。
* **Qwen:** 阿里巴巴的多语言模型。
* **DeepSeek:** DeepSeek 模型。
* **其他开源模型:** Gemma、Phi 等。

有关当前可用模型的列表，请参阅[Fireworks 的模型文档](https://docs.fireworks.ai/models)。

### 配置参数

| 参数              | 范围        | 描述     |
| --------------- | --------- | ------ |
| **Temperature** | 0.0 - 2.0 | 响应随机性  |
| **Max Tokens**  | 1+        | 最大响应长度 |
| **Top P**       | 0.0 - 1.0 | 核心采样   |

### 工具调用

* **支持的工具选择:** `auto`, `required`, `none`。
* **并行执行:** 是。

## Google Gemini

使用此模型前，请确保您拥有[Google AI API 密钥](https://aistudio.google.com/app/apikey)。

### 可用模型

Google 提供针对不同用例优化的多个层级（Ultra、Pro、Flash）的 Gemini 模型。

有关当前可用模型的列表，请参阅[Google 的 Gemini 文档](https://ai.google.dev/models/gemini)。

### 配置参数

| 参数                    | 范围        | 描述       |
| --------------------- | --------- | -------- |
| **Temperature**       | 0.0 - 2.0 | 响应随机性    |
| **Max Output Tokens** | 1+        | 最大响应长度   |
| **Top P**             | 0.0 - 1.0 | 核心采样     |
| **Top K**             | 1+        | Top-k 采样 |

### 工具调用

* **支持的工具选择:** `auto`, `any`, `none`。
* **并行执行:** 否。

## Google Vertex AI

使用此模型前，请确保您拥有[Google Cloud 凭证](https://cloud.google.com/vertex-ai/docs/authentication)。

### 可用模型

Google 提供针对不同用例优化的多个层级（Ultra、Pro、Flash）的 Gemini 模型，以及通过 Vertex AI 可用的其他模型。

有关当前可用模型的列表，请参阅[Vertex AI 文档](https://cloud.google.com/vertex-ai/docs/generative-ai/models)。

### 配置参数

| 参数                    | 范围        | 描述       |
| --------------------- | --------- | -------- |
| **Temperature**       | 0.0 - 2.0 | 响应随机性    |
| **Max Output Tokens** | 1+        | 最大响应长度   |
| **Top P**             | 0.0 - 1.0 | 核心采样     |
| **Top K**             | 1+        | Top-k 采样 |

#### 高级选项

* **区域选择:** 在特定的 Google Cloud 区域部署。
* **安全设置:** 配置内容过滤阈值。

### 工具调用

* **支持的工具选择:** `auto`, `any`, `none`。
* **并行执行:** 否。

## Groq

使用此模型前，请确保您拥有[Groq API 密钥](https://console.groq.com/keys)。

### 可用模型

Groq 为流行的开源模型（包括 Llama、Mixtral 和 Gemma 变体）提供高速推理。

有关当前可用模型的列表，请参阅[Groq 的模型文档](https://console.groq.com/docs/models)。

### 配置参数

| 参数              | 范围        | 描述     |
| --------------- | --------- | ------ |
| **Temperature** | 0.0 - 2.0 | 响应随机性  |
| **Max Tokens**  | 1+        | 最大响应长度 |

### 工具调用

* **支持的工具选择:** `auto`, `required`, `none`。
* **并行执行:** 是。

## Mistral AI

使用此模型前，请确保您拥有[Mistral AI API 密钥](https://console.mistral.ai/api-keys/)。

### 可用模型

Mistral 提供针对不同性能和成本要求优化的多个层级（Large、Medium、Small）的模型。

有关当前可用模型的列表，请参阅[Mistral 的文档](https://docs.mistral.ai/platform/endpoints/)。

### 配置参数

| 参数              | 范围        | 描述     |
| --------------- | --------- | ------ |
| **Temperature** | 0.0 - 1.0 | 响应随机性  |
| **Max Tokens**  | 1+        | 最大响应长度 |
| **Top P**       | 0.0 - 1.0 | 核心采样   |

### 工具调用

* **支持的工具选择:** `auto`, `any`, `none`。
* **并行执行:** 否。

## OpenAI

使用此模型前，请确保您拥有[OpenAI API 密钥](https://platform.openai.com/api-keys)或[Azure OpenAI 凭证](https://learn.microsoft.com/en-us/azure/ai-services/openai/quickstart)。

### 可用模型

OpenAI 提供具有不同能力和价格点的几个模型系列：

* **GPT 系列:** 具有各种尺寸/能力层级的通用聊天模型。
* **o 系列:** 专注于推理的模型，针对复杂问题解决进行了优化。
* **旧版模型:** 较旧的 GPT-3.5 和 GPT-4 变体。

有关当前可用模型的列表，请参阅[OpenAI 文档](https://platform.openai.com/docs/models)。

### 配置参数

标准参数：

| 参数                    | 范围         | 描述                         |
| --------------------- | ---------- | -------------------------- |
| **Temperature**       | 0.0 - 2.0  | 控制随机性。较低 = 更专注，较高 = 更具创造性。 |
| **Max Output Tokens** | 1+         | 响应的最大长度                    |
| **Top P**             | 0.0 - 1.0  | 核心采样阈值。Temperature 的替代方案。  |
| **Presence Penalty**  | -2.0 - 2.0 | 惩罚新主题（正值）或鼓励新主题（负值）        |
| **Frequency Penalty** | -2.0 - 2.0 | 惩罚重复（正值）或允许重复（负值）          |
| **Seed**              | 整数         | 用于可重现的输出                   |

高级参数：

**推理努力**：在推理优化的模型（o 系列和较新的 GPT 模型）上可用。

控制响应前的推理深度。更高的努力 = 复杂任务的质量更好，延迟更长。

| 值         | 描述            |
| --------- | ------------- |
| `none`    | 禁用推理（标准聊天行为）  |
| `minimal` | 最小推理          |
| `low`     | 轻度推理          |
| `medium`  | 中等推理（默认）      |
| `high`    | 深度推理          |
| `xhigh`   | 超深度推理（如果模型支持） |

<Note>
  当 reasoning\_effort 处于活动状态（非 `none`）时，temperature、top\_p 和惩罚项会自动禁用。
</Note>

**服务层级**：在较新的模型上可用。

控制请求优先级和处理分配。

| 值          | 描述                |
| ---------- | ----------------- |
| `auto`     | 系统根据负载决定（默认）      |
| `default`  | 标准处理队列            |
| `flex`     | 较低成本，可变延迟（如果模型支持） |
| `priority` | 高优先级队列，较低延迟，较高成本  |

**其他参数:**

* **JSON 模式:** 强制有效的 JSON 响应。
* **Responses API:** 改进的流式传输（默认：启用）。
* **并行工具调用:** 同时执行多个工具。

### 工具调用

* **支持的工具选择:** `auto`, `required`, `none`，或特定工具名称
* **并行执行:** 是

## OpenAI 兼容端点

身份验证因端点而异（通常是 API 密钥或无）。

### 配置

**必需项:**

* **基础 URL:** 您的端点 URL（例如，`https://your-endpoint.com/v1`）。
* **模型名称:** 您的模型标识符。

适用于任何实现 OpenAI 兼容 API 格式的框架或服务，包括：

* 自托管的开源推理服务器
* 模型路由代理
* 自定义模型端点

### 配置参数

所有 OpenAI 兼容参数：

| 参数                    | 范围         | 描述     |
| --------------------- | ---------- | ------ |
| **Temperature**       | 0.0 - 2.0  | 响应随机性  |
| **Max Tokens**        | 1+         | 最大响应长度 |
| **Top P**             | 0.0 - 1.0  | 核心采样   |
| **Frequency Penalty** | -2.0 - 2.0 | 减少重复   |
| **Presence Penalty**  | -2.0 - 2.0 | 鼓励新主题  |

**高级选项:**

* **JSON 模式:** 如果端点支持。
* **流式传输:** 如果端点支持。
* **函数调用:** 如果端点实现 OpenAI 格式。

### 工具调用

* **支持的工具选择:** `auto`, `required`, `none`（如果端点支持）。
* **并行执行:** 是（如果端点支持）。

### 端点示例

**本地 Ollama:**

```
基础 URL: http://localhost:11434/v1
模型: llama3.1
```

**vLLM 服务器:**

```
基础 URL: https://your-server.com/v1
模型: mistral-7b-instruct
```

**LiteLLM 代理:**

```
基础 URL: https://litellm.example.com
模型: gpt-4 (路由到配置的后端)
```

## XAI

使用此模型前，请确保您拥有[xAI API 密钥](https://console.x.ai/)。

### 可用模型

xAI 提供针对不同用例的多种尺寸的 Grok 模型。

有关当前可用模型的列表，请参阅[xAI 的文档](https://docs.x.ai/docs)。

### 配置参数

标准 OpenAI 兼容参数：

| 参数                    | 范围        | 描述       |
| --------------------- | --------- | -------- |
| **Temperature**       | 0.0 - 2.0 | 响应随机性    |
| **Max Tokens**        | 1+        | 最大响应长度   |
| **Top P**             | 0.0 - 1.0 | 核心采样     |
| **Presence Penalty**  | 0 - 2.0   | 在推理模型上隐藏 |
| **Frequency Penalty** | 0 - 2.0   | 在推理模型上隐藏 |

### 工具调用

* **支持的工具选择:** OpenAI 兼容。
* **并行执行:** 是（如果支持）。

## 所有提供商的通用配置

### 额外参数

所有提供商都支持**用于未在 UI 中暴露的额外参数的 JSON 编辑器**：

```json theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
{
  "logprobs": true,
  "top_logprobs": 5,
  "custom_parameter": "value"
}
```

**使用场景:**

* 提供商特定的测试版功能
* 尚未在 UI 中的高级参数
* 用于跟踪的自定义元数据

**限制:** 无法覆盖已在 UI 中设置的参数（例如，如果上面设置了 temperature，则无法在此处设置）

### 速率限制

**每秒请求数 (RPS)** - 在对数据集运行时对所有提供商可用：

* **范围:** 0 - 500 RPS
* **目的:** 遵守 API 速率限制，控制成本
* **默认值:** 因提供商而异

在运行实验或评估时设置此项，以避免达到速率限制。

## 后续步骤

<CardGroup cols={2}>
  <Card title="配置提示设置" icon="settings" href="/langsmith/managing-model-configurations">
    了解如何在 Playground 中创建和管理模型配置。
  </Card>

  <Card title="创建提示" icon="edit" href="/langsmith/create-a-prompt">
    开始使用您选择的模型提供商构建提示。
  </Card>
</CardGroup>

***

<div className="source-links">
  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/i18n\zh-CN\langsmith\playground-model-providers.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>

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