-
Tool Overview
Trae is an AI coding tool that supports both built-in models and custom models. Its custom model configuration supports API formats such as OpenAI Chat Completions and Anthropic Messages, and allows you to configure a custom request URL, Model ID, and API Key.
-
Prerequisites
Please prepare the following information in advance:
-
Gateway Base URL
-
Gateway API Key
-
Model ID
-
API format supported by the Gateway
-
Integration Steps
Step 1: Open Model Settings
Open Trae and go to:
Settings → Models
This will open the model management page.
Step 2: Add a Model
Click:
Add Model
Then select:
Custom Model
Step 3: Configure Model Parameters
Enter the following information based on the API format supported by the Gateway:
-
API Format
-
Request URL / Base URL
-
Model ID
-
API Key
If the Gateway uses an OpenAI-compatible API, select:
OpenAI Chat Completions
If the Gateway uses the Anthropic Messages API, select:
Anthropic Messages
According to Trae's official documentation, custom models can be configured with an API format, request URL, Model ID, and API Key.
Step 4: Save and Select the Model
After completing the configuration, save the settings.
Return to the model list and select the newly added model.