Using Downsizing with TRAE
Route TRAE's custom model provider through Downsizing using TRAE's built-in Add Model form.
Prerequisites
Install the Downsizing CLI — see the CLI guide if you haven't already.
Link TRAE
TRAE's custom model provider settings are configured through its own Settings → Models → Add Modeldialog, not a plain config file — there is no ByteDance-published, stable on-disk schema for a custom model/BYOK entry the way there is for e.g. VS Code's settings.json. So ds link traedoesn't edit any files. Instead it prints the exact values to paste into TRAE's Add Model form:
ds link traeCopy the printed values into TRAE's settings:
- Open TRAE, go to Settings → Models, and click Add Model
- Set Provider to Anthropic
- Paste the printed Base URL into the Base URL field
- Paste the printed API key (starts with
dws_) into the API Key field - Set Model to a Claude model, e.g.
claude-opus-4-8, and save
If your TRAE build only exposes an "OpenAI-compatible" provider slot, ds link traealso prints an OpenAI-compatible base URL you can use instead — TRAE's Add Model dialog documents both provider types.
Why there's no config file to write
TRAE's official docs (docs.trae.ai/ide/models, "Built-in models & custom models") and community reports describe adding a custom model exclusively through the Settings UI dialog. Some third-party guides mention a settings.jsonunder TRAE's application-support directory, but explicitly note that path is for reference only and not part of the supported setup flow — and, like VS Code's own native bring-your-own-key feature (which TRAE is built on), API keys for custom providers are expected to live in secret/encrypted storage rather than a plain file. Rather than guess at an undocumented file format, ds link trae sticks to printing the values for the documented GUI flow.
Manual Setup
You can configure TRAE manually without running the CLI. Open TRAE's Settings → Models → Add Model and fill in:
https://api.downsizing.dev/YOUR_ROUTER_ID/anthropicEnter this as the Base URL, your Downsizing API key (starts with dws_) as the API Key, set Provider to Anthropic, and pick a Claude model, e.g. claude-opus-4-8.
Find your Router ID and API key on the Inference API page.
Verify
Open a project in TRAE, select the new model in the model picker, and send a message to confirm traffic is routing through Downsizing. If TRAE responds normally, Downsizing is set up correctly. You can also check your savings dashboard to see the request appear in your usage metrics.
Unlinking
Because ds link traenever wrote a config file, there's nothing on disk to remove. Run the unlink command to update ds's own record of linked tools, then remove the custom model directly in TRAE's Settings → Models:
ds unlink traeSpot an error or something not working? Tell us on Discord or email docs@downsizing.dev.