Skip to main content

Overview

TRAE is an AI-native IDE by ByteDance. Its built-in Custom Config panel accepts any OpenAI-compatible or Anthropic-compatible endpoint, routing the full AI Gateway catalog through Orq.ai for unified tracing, cost tracking, and access controls without any plugin or extension.

Prerequisites

Setup

1

Open the Models settings

In TRAE, click the icon in the top-right of the chat panel to open Settings, then navigate to Models.
2

Add a provider entry

Two provider formats are needed. For each, click + Add Model, expand the Custom Config section, and fill the fields for the relevant format below.
Always use the provider/model_id format for Model ID (e.g. openai/gpt-4o, anthropic/claude-sonnet-4-6). Model IDs without the provider prefix return a 400 invalid model format error.
For OpenAI, Google, DeepSeek, and all other non-Anthropic models:
FieldValue
API FormatOpenAI Chat Completions
Custom Request URLhttps://api.orq.ai/v3/router
Full URLOFF (TRAE auto-appends /chat/completions)
Model IDopenai/gpt-4o (or any non-Anthropic model with the provider/ prefix)
MultimodalON if the model supports vision
API Key<ORQ_API_KEY>
Replace <ORQ_API_KEY> with the key from Workspace Settings → API Keys.
3

Configure Advanced Settings (optional)

Expand Advanced Settings to tune per-model behavior:
FieldNotes
Model SeriesDefault works for all AI Gateway models. Other options tune hyperparameters per provider family; leave as Default unless a specific family requires it.
Display NameOptional label shown in the model picker. Defaults to Model ID.
Context WindowSet input/output token limits explicitly if the model requires it.
Tool Call RoundsDefaults to 200. Raise for long agentic loops.
4

Submit

Click Submit. The model appears in the TRAE model selector.
5

Select the model in a chat

Use the model selector in the bottom-right of the TRAE chat panel to pick the AI Gateway-routed provider for the current session.

Troubleshooting

The Model ID is missing the provider prefix. Change gpt-4o to openai/gpt-4o, claude-sonnet-4-6 to anthropic/claude-sonnet-4-6, and so on. All AI Gateway model IDs require the provider/ prefix.
A Claude model is configured under the OpenAI Chat Completions format. Create a separate provider entry using API Format: Anthropic Messages pointing at https://api.orq.ai/v3/anthropic instead.
If OPENAI_API_KEY or OPENAI_BASE_URL are set in the environment and a legacy OpenAI provider is also configured in TRAE, requests may resolve to the wrong endpoint. Unset those variables if not in use:
unset OPENAI_API_KEY OPENAI_BASE_URL
Confirm the API Key field contains a valid Orq.ai API key (not an OpenAI or Anthropic key) and that Custom Request URL points to the correct Orq endpoint for the chosen format.