# TRAE: install, configure and troubleshoot LYRouter access

Source: https://platform.lyrouter.com/ai_gateway/docs/trae/en
Last updated: 2026-10-14

TRAE can connect to LYRouter as a custom model service. This page starts with the installation prerequisites, then shows how to configure the tool and make your first call.

Already installed? Go straight to [Configure LYRouter](#configure-lyrouter).

## Prerequisites

Prepare a TRAE account, network access and permission to install software locally. Choose your operating system, check the system version and processor architecture, and make sure the client offers a custom model setting.

**Choose your operating system**

Windows:
#### 1. Check the system version and architecture

Use Windows 10 / 11 on **x64**, and check in PowerShell:

```powershell
Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, OSArchitecture
```

#### 2. Prepare installation and sign-in

Choose the Windows installer from the [TRAE download center](https://www.trae.cn/download), make sure the installation directory is writable, and make sure you can sign in to TRAE. Prepare the compilers, Python or Node.js that your projects need separately, as each project requires.

Linux:
#### 1. Check the distribution and architecture

The official installation guide lists `.deb` packages for Ubuntu 20.04+ / Debian 10+ and `.rpm` packages for Fedora 42 / RHEL 9.x. Choose the x64 / ARM64 architecture on the download page:

```bash
cat /etc/os-release
uname -m
```

#### 2. Prepare a desktop and installation permission

You need a desktop environment that can run graphical apps, network access and permission to install packages. The package format must match your distribution, and dependencies follow the prompts of the installer and the [official guide](https://docs.trae.cn/ide_get-started-with-trae). A plain SSH terminal cannot display the local graphical interface directly.

macOS:
#### 1. Check the system and processor

Use macOS 12+, on Apple Silicon or Intel:

```bash
sw_vers -productVersion
uname -m
```

#### 2. Prepare installation and sign-in

In the [download center](https://www.trae.cn/download), choose the macOS installer for your processor, make sure you can install to the Applications folder, and prepare a TRAE account and network access.

To connect to LYRouter you also need an enabled API key and a model available in the current workspace. Replace `MODEL_ID` in the examples with an actual system model identifier. Your tool account and your LYRouter account are two separate identities.

## Install the app

1. Open the [TRAE download center](https://www.trae.cn/download).
2. Choose the installer for your operating system and architecture, and complete the installation.
3. On first launch, choose a language and theme, and sign in to TRAE.
4. Check the client version under "About" or in the update information, then open a test project.

## Configure LYRouter

Open the model settings and add a custom / OpenAI-compatible model:

| Field | Value |
| --- | --- |
| Provider / display name | LYRouter |
| API format | OpenAI-compatible |
| Base URL | https://api.lyrouter.com/v1 |
| API Key | Your LYRouter API key |
| Model ID | The actual system model identifier in the current workspace |

After saving, explicitly select this custom model. TRAE's built-in Auto is not the same as LYRouter Auto, and it does not guarantee that the custom model is used.

## Verify your first call

Start the app, explicitly select the model you just configured, and send a minimal task such as "Reply OK". Then check the generation endpoint, status and actual model in LYRouter's [request logs](https://platform.lyrouter.com/ai_gateway/docs/logs/en). A successful connection test does not mean that full generation or tool calling works.

## Everyday use and troubleshooting

### The app does not start after installation. How do I check?

**Answer:** Check the operating system, processor architecture and installation permission against "Prerequisites" on this page, then check the installation against the installation guide for your system. Use the official installer; the official resources linked on this page define the specific system requirements.

### What Base URL do I enter for the custom model?

**Answer:** The OpenAI-compatible configuration on this page uses `https://api.lyrouter.com/v1`, together with your LYRouter API key and a system model identifier. Do not append `/v1` again. After saving, explicitly select the custom model in the conversation.

### What should I check before switching models?

**Answer:** Make sure the new model is enabled in the current workspace, has at least one valid service source, and supports the protocol and tool capabilities the app needs. Use the system model identifier, not the display name.

### Why does my configuration stop working after an app update?

**Answer:** First check the current app version and which configuration location it actually reads, then check the provider, address, key and model against "Configure LYRouter" on this page. The official resources linked on this page define the configuration requirements of each version.

### A request returns 401 / 403. What should I check first?

**Answer:** Make sure you entered an enabled LYRouter API key, and check the model sources and access policies of the workspace the key belongs to. Use the specific error and the logs to find what rejected the request; see [401 / 403: authentication and access](https://platform.lyrouter.com/ai_gateway/docs/auth-errors/en).

### A request returns 429. Does retrying repeatedly help?

**Answer:** First find out whether a platform limit or an exhausted upstream quota caused it, then adjust concurrency, call frequency or resource configuration. Retry with bounded backoff instead of retrying immediately and repeatedly; see [429: rate limits and quotas](https://platform.lyrouter.com/ai_gateway/docs/rate-errors/en).

### The app replies, but I cannot find the request in the LYRouter logs. What should I do?

**Answer:** Make sure the conversation uses the custom model you just configured, not a built-in model or Auto mode, then send a minimal generation request. Search the [request logs](https://platform.lyrouter.com/ai_gateway/docs/logs/en) in the correct workspace by time and key; a request that just finished may need a refresh a little later.

## Official resources

The requirements and installation methods below come from the tool's official documentation. For later versions, the official instructions take precedence.

- [Installation prerequisites and steps](https://docs.trae.cn/ide_get-started-with-trae)
- [Custom models](https://docs.trae.cn/ide_models)
