Skip to main content
Cline 支持通过 Mistral AI API 访问模型,包括标准 Mistral 模型和专门用于代码的 Codestral 模型。 网站: https://mistral.ai/

获取 API 密钥

  1. 注册/登录: 访问 Mistral 平台。创建账户或登录。你可能需要通过验证过程。
  2. 创建 API 密钥:

支持的模型

Cline 支持以下 Mistral 模型:
  • pixtral-large-2411
  • ministral-3b-2410
  • ministral-8b-2410
  • mistral-small-latest
  • mistral-medium-latest
  • mistral-small-2501
  • pixtral-12b-2409
  • open-mistral-nemo-2407
  • open-codestral-mamba
  • codestral-2501
  • devstral-small-2505
注意: 模型可用性和规格可能会发生变化。 请参考 Mistral AI 文档Mistral 模型概述 获取最新信息。

在 Cline 中配置

  1. 打开 Cline 设置: 点击 Cline 面板中的设置图标(⚙️)。
  2. 选择提供商: 从”API 提供商”下拉菜单中选择”Mistral”。
  3. 输入 API 密钥: 如果你使用标准 mistral 模型,将你的 Mistral API 密钥粘贴到”Mistral API 密钥”字段中。如果你打算使用 codestral-latest,请参阅下面的”使用 Codestral”部分。
  4. 选择模型: 从”模型”下拉菜单中选择你想要的模型。

使用 Codestral

Codestral 是专门为代码生成和交互而设计的模型。 对于 Codestral,你可以使用不同的端点(默认:codestral.mistral.ai)。 如果为 Codestral 使用 La Plateforme API 密钥,请将 Codestral 基础 URL 更改为:https://api.mistral.ai 要在 Cline 中使用 Codestral:
  1. 在 Cline 设置中选择”Mistral”作为 API 提供商。
  2. 选择 Codestral 模型(例如,codestral-latest)从”模型”下拉菜单中。
  3. 输入你的 Codestral API 密钥(来自 codestral.mistral.ai)或你的 La Plateforme API 密钥(来自 api.mistral.ai)到 Cline 中相应的 API 密钥字段。