Suanlimao
← Back to all tutorials

Connect your tools

Trae

Add a custom model in Trae (CN or international edition) that uses our address.

About 6 minFor:Developers who code in Trae

Before you start

  • Trae is installed and you are signed in (CN or international edition)
  • A key and a model name copied from the model plaza

Step 1 · STEP 0x01

Open model settings and add a model

Settings → Models
1
Add Model
2

Source

Custom Model
Diagram only — the real screen in your version may differ

In the IDE or Agent window go to Settings → Models and click Add Model. Do not pick one of TRAE's preset providers (they only take that vendor's own key); choose Custom Model at the bottom.

Create a key →

Step 2 · STEP 0x02

Pick the API format, enter the address and key

Add Model → Custom Model
1

API Format

OpenAI Chat Completions
2

Full URL

Off
3

Custom Request URL

https://api.suanlimao.shop/v1
4

Model ID

<MODEL_NAME>
5

Display Name

Anything you like
6

API Key

<YOUR_API_KEY>
7
Add
Diagram only — the real screen in your version may differ
  • Choose OpenAI Chat Completions. For Claude-family models you may choose Anthropic Messages instead — then the address is https://api.suanlimao.shop without /v1.
  • Leave Full URL off and enter https://api.suanlimao.shop/v1; TRAE appends /chat/completions for the chosen format. If you turn the switch on, enter the full path https://api.suanlimao.shop/v1/chat/completions instead.
  • Model ID is the name copied from the plaza; the display name is up to you.
  • On Add, TRAE makes a real call to validate the key; if it fails it shows the provider's error message and logs.
Don't guess the model name: open the model plaza, click “Copy model id” on a model card and paste it. A wrong model name is the most common error.

Open the model plaza →

Step 3 · STEP 0x03

Adjust advanced settings if needed, then pick it in chat

Custom Model → Advanced Settings
1

Model Series

Default (or the series closest to your model)
2

Context Window (Token)

Per the model's details on the plaza
3

Image Input Support

Per the model's capability
4

Model picker in chat

The model you added
Diagram only — the real screen in your version may differ
  • Fill context window, tool-call rounds and image input from the plaza's model details; defaults are fine to start.
  • Back in the chat box, switch the model picker to it and send a message.
The CN and international editions differ in preset providers and Model Series options (some are enterprise-only), but Custom Model works in both. Follow the wording in your version.

✓ How to tell it worked

  • Chat answers with the model you added.
  • The Usage page shows the request.

FAQ

Adding fails and shows a provider log.

Read the status code in the log: 401 means a wrong or truncated key; 404 is usually a wrong model ID, or Full URL is on while you entered only https://api.suanlimao.shop/v1; 402 is insufficient balance.

Which address for Anthropic Messages format?

With Full URL off, the root https://api.suanlimao.shop without /v1; with it on, https://api.suanlimao.shop/v1/messages.

Can I use the Responses API?

Trae's custom models offer only Chat Completions and Anthropic Messages, not Responses. See the Codex or OpenCode tutorials for Responses.

Related tutorials

Still stuck?

Read the troubleshooting tutorials first. If that does not help, open a ticket with the request_id, time, model and the exact error (never paste your key).