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

# TRAE

> 了解如何在 TRAE AI IDE 中通过 Custom Config 配置 OpenAI-compatible endpoint，接入 siflow endpoint，让 agent 和 chat 使用算秩模型。

[TRAE](https://www.trae.ai) 是一款内置 coding agent 的 AI IDE。它的 **Custom Config** 模型选项接受 OpenAI-compatible endpoint，因此可以指向 siflow endpoint，用于 agent 和 chat。

支持的模型包括 `glm-5.2` 和 `DeepSeek-V4-Flash`。完整列表和价格请参考 [模型广场](https://console.siflow.cn/model-inference/models)。

## 配置

请先在 [API 密钥](https://console.siflow.cn/model-inference/api_keys) 页面创建 API Key。

1. 打开 **Settings → Models**，单击 **Add Model**，并切换到 **Custom Config** tab。

2. 填写所需字段。

   | 参数                 | 示例                                                                             |
   | ------------------ | ------------------------------------------------------------------------------ |
   | API Format         | **OpenAI Chat Completions**                                                    |
   | Custom Request URL | `https://api.siflow.cn/model-api/v1`                                           |
   | Model ID           | `glm-5.2`                                                                      |
   | API Key            | 您在 [API 密钥](https://console.siflow.cn/model-inference/api_keys) 页面创建的 API Key。 |

   保持 **Full URL** toggle 关闭。TRAE 会在您提供的 URL 后追加 `/chat/completions`，因此请输入不带 trailing slash 的 base endpoint。

   在 **Advanced Settings** 下，可以设置 **Display Name** 和 **Context Window**。**Multimodal** 是 **Add Model** 弹窗中的独立 toggle，仅在使用 vision-capable model 时启用。请为 agent 的文件操作选择原生支持 tool calling 的模型。

3. 单击 **Add Model**。

<img src="https://mintcdn.com/siflow/MnqDOrFLyFtwF7sA/model-inference/media/trae-add-model.png?fit=max&auto=format&n=MnqDOrFLyFtwF7sA&q=85&s=041605c3584602ebd7f22aac4efa7fa0" alt="TRAE 中通过 Custom Config 添加算秩模型" width="1344" height="1656" data-path="model-inference/media/trae-add-model.png" />

## 验证

打开 agent panel，在底部模型选择器中选择算秩模型，然后给它一个任务。TRAE 会规划任务并编辑文件，要求您 keep 或 undo 变更。如果正常回复，即表示连接成功。

<img src="https://mintcdn.com/siflow/MnqDOrFLyFtwF7sA/model-inference/media/trae-agent-task.png?fit=max&auto=format&n=MnqDOrFLyFtwF7sA&q=85&s=4c5c25f6693ddb0019a8c548719b3f76" alt="TRAE Agent 使用算秩模型执行文件创建任务" width="2202" height="1590" data-path="model-inference/media/trae-agent-task.png" />

## 常见问题

* **模型无响应 / 没有 edits**：确认当前选择的是已添加的算秩模型，并且该模型原生支持 tool calling。
