Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt

Use this file to discover all available pages before exploring further.

1. Introduction

Trae is ByteDance’s AI-native IDE released in January 2025 — a productivity tool aimed at professional developers (“Vibe Coding”): describe what you want in natural language, AI handles code completion, bug fixes, project scaffolding, and one-click preview. Trae ships as both a China edition (trae.cn) and an International edition (trae.ai), with a spin-off SOLO lineup (SOLO Desktop / SOLO App / SOLO Web) where AI fully drives the task lifecycle. Plug Trae into GravitexAI via its “Custom Model” mechanism and you get:

🔌 Dual-protocol coverage

Configure OpenAI and Anthropic protocols simultaneously — one key drives both

🤖 100+ frontier models

GPT, Claude, Gemini, DeepSeek, Doubao, Qwen, Kimi, MiniMax in one place

🛡️ Automatic failover

Distributed infrastructure routes around outages with backup models

💼 Enterprise-grade

Transparent token-level billing, org-level data policies, team/enterprise ready
Product info
  • 🔗 China edition: www.trae.cn
  • 🔗 International edition: www.trae.ai
  • 👥 Developer: ByteDance
  • 📅 First released: January 2025
  • 🧩 Modes: Builder (agent) / Chat (sidebar) / Inline Chat
  • 🌐 Compatible protocols: OpenAI, Anthropic, and other custom providers

2. Core Features

Three interaction modes

  • Builder: agent mode — AI reads/writes multiple files, runs commands, and builds the project autonomously
  • Chat: side-bar conversation, similar to Cursor Chat / Cline — best for Q&A and snippet generation
  • Inline Chat: invoke directly inside the editor with Cmd/Ctrl + I — fastest path for inline completion and refactors

MCP & tooling ecosystem

  • Built-in MCP (Model Context Protocol) support for connecting external tools and APIs
  • Remote-SSH support — remote development feels identical to local
  • .rules project-level rule files to constrain AI behavior style

Custom models (the focus of this guide)

Trae International ships with presets for Anthropic, OpenAI, Gemini, xAI, OpenRouter, Ollama, DeepSeek, Volcengine, Aliyun, Tencent Cloud, SiliconFlow, PPIO, Novita, BytePlus, and each preset allows you to fill in a custom model ID + API key + custom request URL — exactly the hook we use to wire in GravitexAI.
Why route through GravitexAI: Trae’s built-in models are limited by region and version, and there’s no unified billing across providers. Wire in GravitexAI and one key covers both OpenAI and Anthropic protocols — switching between GPT/Gemini and Claude no longer requires touching the settings panel; just pick from the top model dropdown.

3. Prerequisites

  • Trae installed (trae.cn or trae.ai)
  • An API key from the GravitexAI Console (format: sk-xxxxxxxxxx)
Base URL: Trae’s custom-model field requires the full endpoint path, not just the domain.
  • OpenAI protocol: https://api.gravitex.ai/v1/chat/completions
  • Anthropic protocol: https://api.gravitex.ai/v1/messages

4. Quick Start

Step 1: Install Trae

Step 2: Get a GravitexAI API key

  1. Open the GravitexAI Console
  2. Click “Create token”, name it, and save
  3. Copy the sk-… key

Step 3: Open Trae’s “Custom Model” entry

  • In IDE mode: click ⚙️ (top-right) → Models in the left nav → “Add model” / “Custom model”
  • In SOLO mode: click ⚙️ on the chat panel → Models → Add

Step 4: Add an OpenAI-protocol provider (GPT / Gemini / DeepSeek / Doubao etc.)

FieldValueNotes
ProviderOpenAIPick the OpenAI preset
ModelCustom modelChoose “Custom model” at the bottom of the dropdown
Model IDe.g. gpt-5.5, gemini-3.5-flash, deepseek-v3-2-251201Use the canonical model ID
API keysk-…Paste the GravitexAI token from Step 2
Custom request URLhttps://api.gravitex.ai/v1/chat/completionsMust include /v1/chat/completions
The base URL must include the full path: starting from v3.3.51, Trae’s custom-model baseURL field requires the complete endpoint path. Submitting just https://api.gravitex.ai or https://api.gravitex.ai/v1 will fail.

Step 5: Add an Anthropic-protocol provider (Claude family)

To use Claude Opus 4.7 / Sonnet 4.6 / Haiku 4.5, add a second provider entry:
FieldValueNotes
ProviderAnthropicPick the Anthropic preset
ModelClaude-Sonnet-4.6 (or another Claude variant)Use the official preset, or “Custom model”
API keysk-…Paste the same GravitexAI token — keys are shared across both protocols
Custom request URLhttps://api.gravitex.ai/v1/messagesMust include /v1/messages — note this is not /v1/chat/completions
Why two protocols: OpenAI talks /v1/chat/completions, Anthropic talks /v1/messages. GravitexAI hosts both, so a single key can drive both provider entries in Trae without interference.

Step 6: Switch and ship

Back in the editor, click the model dropdown at the top. Both providers and their models appear together. Pick one and start chatting or jump into Builder mode.

Daily coding (best value)

Claude Sonnet 4.6 (Anthropic) + GPT-5.5 (OpenAI)Sonnet 4.6 is highly capable at code with great value; GPT-5.5 replies faster in Chat mode

Complex architecture (flagship)

Claude Opus 4.7 (Anthropic)Best for complex refactors, cross-file analysis, architecture decisions; pair with Builder mode

Deep reasoning

Claude Sonnet 4.6 Thinking / GPT-5.5 ThinkingForces chain-of-thought reasoning — ideal for algorithm problems, logic, security audits

Cost-effective domestic

DeepSeek V3.2 / Doubao Seed 2.0 Pro / Qwen3 Coder PlusAll ride the OpenAI protocol; cheaper per token with strong Chinese output

Full model catalog and coding picks

GravitexAI exposes 100+ frontier models through a unified API. The model catalog is updated with the latest performance and pricing comparisons.

6. Tips

1

Keep both provider entries

Add both OpenAI and Anthropic entries so you can switch between GPT/Gemini ↔ Claude without re-editing the baseURL.
2

Can't find your model in the dropdown?

Trae’s built-in model list lags behind GravitexAI’s catalog. Pick “Custom model” and type the model ID manually — that’s the most reliable path. Refer to the GravitexAI catalog for canonical IDs.
3

Use Claude for Builder mode

Builder’s agent loop relies heavily on multi-turn tool calls. Claude (especially Sonnet 4.6 / Opus 4.7) is markedly more stable at instruction-following and tool use than other model families.
4

Pin Thinking variants for complex work

Append -thinking to the model ID (e.g. claude-sonnet-4-6-thinking) to force chain-of-thought reasoning. Makes Builder-mode architecture decisions and security audits much more reliable.
5

Split keys by purpose

Create separate GravitexAI tokens for dev/prod or per-team in the console for cleaner quota management and reconciliation.

7. FAQ

No — both editions support custom models and allow you to add OpenAI and Anthropic provider entries side by side. The difference is mainly in the pre-bundled model presets (China edition leans on Doubao/DeepSeek; International leans on GPT/Claude/Gemini).Recommendation: prefer trae.cn if you’re on a mainland-China network, otherwise trae.ai for global teams or international model presets.
Starting from v3.3.51, Trae changed how it resolves the custom-model baseURL — it now uses the value verbatim instead of auto-appending /chat/completions.Correct values:
  • OpenAI: https://api.gravitex.ai/v1/chat/completions
  • Anthropic: https://api.gravitex.ai/v1/messages
Incorrect (will 404 or mis-route):
  • https://api.gravitex.ai
  • https://api.gravitex.ai/v1
Yes. The Anthropic provider entry also exposes a “Custom model” option — drop in IDs like claude-opus-4-7 / claude-sonnet-4-6-thinking / claude-haiku-4-5-20251001. GravitexAI’s /v1/messages endpoint accepts all official model IDs.
Trae’s built-in presets lag the actual provider catalog. Just pick “Custom model” and type the ID — anything GravitexAI supports works in Trae without waiting for the client to update.
  1. Default to Claude Sonnet 4.6 or Opus 4.7 — both lead in tool-use stability
  2. Avoid non-reasoning small models like DeepSeek-Chat / Qwen base for Builder; switch to -thinking variants
  3. Watch context length — when a single file is huge or you’re touching many files, move to Opus 4.7 (1M context)
  4. Check GravitexAI status — transient upstream issues affect all clients; the console shows live channel health
Trae is a ByteDance product and uploads telemetry / conversation data per its official privacy policy. If client telemetry is a concern:
  • Whitelist outbound traffic at your network egress
  • Mask sensitive snippets before invoking Builder mode
  • Consider Claude Code / Codex as open-source / auditable alternatives
ToolTypeAgent modeGravitexAI difficultyBest for
TraeStandalone IDE✅ BuilderMedium (two protocol entries)Cursor-like experience with stronger China / Chinese support
CursorStandalone IDE❌ (Chat only)Easy (OpenAI only)Strong autocomplete & diff preview
Claude CodeCLIEasyTerminal workflow, CI / remote dev
CodexCLIEasyOfficial OpenAI terminal agent, full GPT family
Open CodeCLIEasyOpen-source CLI agent, multi-provider
Detailed guides: Codex · Claude Code · Open Code · Gemini CLI
  1. Confirm the API key starts with sk- and has no stray whitespace
  2. Confirm the baseURL is spelled correctly (/v1/chat/completions vs /v1/messages)
  3. Open the GravitexAI Console to verify the token is active and the account has balance
  4. Insufficient balance also surfaces as 401 — double-check

Model catalog

100+ models with performance / pricing comparisons and coding picks

GravitexAI Console

Manage tokens, usage, and projects

Codex integration

OpenAI’s official terminal agent, full GPT family

Claude Code integration

Anthropic’s official CLI agent, full Claude family
Need more help? Reach our BD team at bd@gravitex.ai or call +86 151 1306 2111.