Repository navigation
Description
Problem to solve
OpenCodex currently has no built-in provider for TRAE International (trae.ai).
Users who already have a TRAE International account/subscription cannot select TRAE-hosted models from Codex CLI or the Codex App through OpenCodex. The available community workarounds generally expose an OpenAI-compatible proxy by extracting IDE credentials, capturing private headers, or calling undocumented endpoints. Those approaches are fragile and create avoidable account and credential risks.
This request is specifically for the international service at trae.ai, not TRAE CN (trae.cn) or the enterprise PAT flow.
Proposed solution
Add a built-in provider such as trae or trae-international that uses a supported TRAE authentication/transport boundary.
Preferred integration path:
- Reuse the official TRAE CLI login/session, with TRAE itself owning the browser OAuth flow and token refresh.
- If available in the international CLI distribution, communicate through its ACP server (the community ACP client acpx currently registers TRAE as
traecli acp serve). - Expose the provider through the existing OpenCodex CLI and dashboard:
- add/login/logout/status
- model discovery or a maintained model catalog
- provider/model selection in Codex
- Translate between Codex Responses API behavior and the upstream transport, including:
- streaming text
- multi-turn sessions
- tool calls and tool results
- cancellation and timeout propagation
- upstream errors and usage data when available
- Support the same platforms as OpenCodex where the official TRAE CLI is available.
If TRAE International does not currently expose a supported API or ACP contract, an initial outcome could be documented provider scaffolding or a capability check that explains what upstream support is missing, rather than relying on private IDE endpoints.
Security/non-goals
The integration should not:
- decrypt or copy tokens from TRAE IDE storage
- require browser scripts to extract credentials
- require packet capture, device fingerprint spoofing, or hard-coded IDE headers
- silently fall back to
trae.cnor enterprise-only endpoints - persist refresh tokens outside the official TRAE authentication owner unless explicitly required and securely handled
Alternatives considered
- Configure a third-party TRAE-to-OpenAI proxy as a custom OpenAI-compatible provider. This can work mechanically, but existing projects generally depend on credential extraction or undocumented private endpoints.
- Add a TRAE adapter locally to OpenCodex. This duplicates provider/auth/session work and leaves other users without a maintained solution.
- Use an OpenCode-specific TRAE plugin. OpenCode is a different client and cannot be used directly as OpenCodex's HTTP upstream.
Additional context
- TRAE International: https://www.trae.ai/
- TRAE International login: https://www.trae.ai/login
- ACP client with a native TRAE CLI entry: https://github.com/openclaw/acpx
- OpenCodex already presents itself as a universal Responses API proxy and supports built-in OAuth flows for several providers, so TRAE would fit naturally as another authenticated provider if a supported upstream transport is available.
I would be happy to help test the integration on Windows with a TRAE International account.
Activity
Wibias commentedon Jul 21, 2026
Investigation: TRAE International provider feasibility
I dug into both TRAE CLI projects and the ACP protocol to assess what's actually available for a trae.ai integration. Here's what I found.
Two different "TRAE CLI" projects exist
1.
bytedance/trae-agent(open-source Python CLI, entrypointtrae-cli)This is a general-purpose LLM agent that talks to OpenAI, Anthropic, Google, OpenRouter, etc. via API keys in
trae_config.yamlor env vars. It has no TRAE account login and no OAuth flow. There's an open feature request (bytedance/trae-agent#381, filed March 2026) asking for exactly that. Still unresolved.2.
traecli(the TRAE IDE CLI, installed viairm https://trae.cn/trae-cli/install.ps1 | iex)This is the one acpx registers as
trae -> traecli acp serve. It supports ACP, but:trae.cn, nottrae.aiauthMethods+authenticate+logoutat the protocol level, but token refresh is not specified. It's left to the agent implementationThe core problem for this issue
This issue asks for TRAE International (
trae.ai), not TRAE CN (trae.cn). But:traeclibinary and its ACP server are documented exclusively under the CN domaintraecli acp serveworks with atrae.aiaccount rather than atrae.cnaccountWhat would unblock a real integration
One of these needs to happen upstream:
bytedance/trae-agent#381gets resolved and the open-source CLI gains TRAE OAuth for the international serviceCurrent stance
We're not building on
trae.cnendpoints, IDE credential extraction, or undocumented headers. The security non-goals in this issue are correct and we respect them.If any of the above upstream conditions change, this becomes a straightforward addition following the existing provider pattern (registry entry + OAuth flow + adapter). Until then, this issue stays open as a tracking item for upstream readiness.
Happy to revisit if anyone finds a supported international CLI path or if the upstream situation changes.
lidge-jun commentedon Jul 22, 2026
Update on scoping: adding TRAE International needs an officially supported authentication and transport contract (how tokens are issued/refreshed, and which inference endpoint shape is exposed). Right now there is no documented official API surface we can build against without relying on reverse-engineered internals, which we avoid for providers that can break silently. Keeping this open as a provider request; if you can point to official API docs or a sanctioned developer program, that unblocks the work.
lidge-jun commentedon Aug 2, 2026
Triage status (verified 2026-08-02): TRAE International exists, but the official enterprise page still lists the CLI as "coming soon" and we could not find a sanctioned international inference/authentication API. Please link the official API documentation if one exists now; without a sanctioned API surface this request stays parked.
github-actions commentedon Aug 2, 2026
Automated translation bookkeeping — detected language: unknown.
Wibias commentedon Aug 8, 2026
Status: blocked on a supported upstream transport.
Implementation should not use extracted IDE credentials, private headers, packet capture, or undocumented IDE endpoints.
Unblock criteria:
Until then this is a provider-readiness tracker, not implementation-ready work.
lidge-jun commentedon Aug 19, 2026
리뷰 · 우선순위 34 / 80
현재
dev에는 TRAE International(trae.ai) 내장 프로바이더가 없습니다.trae문자열은src에서 검색되지 않습니다. 사용자는 Codex에서 TRAE 호스트 모델을 고를 수 없고, 커뮤니티 우회는 IDE 자격 증명 추출, 사설 헤더, 미문서 엔드포인트에 의존합니다. 이슈가 그 경로를 명시적으로 거부한 것은 저장소 위생과 맞습니다.이슈가 원하는 것은 공식 인증/수송입니다. TRAE CLI 로그인/세션을 재사용하고, 가능하면 ACP(
traecli acp serve)로 말하며, 기존 CLI/대시보드의 로그인·상태·모델 선택에 올리는 것입니다. 대상은trae.ai이지trae.cn이나 엔터프라이즈 PAT가 아닙니다. 공식 API/ACP가 없으면 스캐폴딩과 능력 검사가 초기 결과여야 합니다.네이티브 신뢰성이 점수를 낮춥니다. IDE 저장소 복호화, 브라우저 스크립트, 패킷 캡처, 지문 위조, 하드코딩 IDE 헤더는 침묵 장애와 계정 위험을 만듭니다. Wibias 조사는 오픈소스
trae-agent와 국제 서비스가 다르고, 기업 페이지는 CLI를 coming soon으로 둔다고 했습니다. 허가된 국제 추론 API가 없으면 구현을 시작하면 안 됩니다.Windows/서비스에서 비공식 엔드포인트는 더 잘 깨집니다. 서드파티 TRAE-to-OpenAI 프록시를 커스텀 프로바이더로 쓰는 것은 사용자가 할 수 있어도, 내장 프로바이더로 올리면 OpenCodex가 그 깨짐을 떠안습니다.
해결방안은 공식 API/ACP/CLI 계약과 세션 소유권이 문서화되기 전에는 이 이슈를 주차하는 것입니다. 그 계약이 오면 기존 OAuth 프로바이더 패턴으로 로그인·카탈로그·와이어 번역을 추가합니다. 패치는 추측하지 않으며, 현재 트리에 TRAE 통합은 없습니다.
이 댓글은 grok-bot이 작성했습니다
lidge-jun commentedon Aug 19, 2026
리뷰 · 우선순위 34 / 80 · 종결
trae.ai 계정을 공식 로그인으로 붙이는 프로바이더 요청임. 지금 커뮤니티는 IDE 토큰/헤더 훔쳐서 OpenAI 호환 프록시 돌리는 식이라 깨지기 쉽고 계정 위험함. CN(
trae.cn)이랑 엔터프라이즈 PAT는 이 이슈 범위 아님.방향은 이해함. 다만 지금은 안 함. 공식 CLI 세션/ACP를 타더라도 인증·리프레시·카탈로그·툴을 새로 깔아야 해서 프로바이더 추가 비용이 큼. 머지 플랜/코어 쪽 먼저임. 비공식 크레덴셜 스크레이프는 이쪽에서 안 받음.
나중에 공식 인증 경계가 분명한 PR이면 봄. 그전까지 이 이슈는 열어 두지 않음.
해결방안: 지금은 패치 없음. 후속이면 TRAE가 소유한 로그인/세션만 재사용하고, 헤더 캡처·undocumented 엔드포인트는 거절.
이 댓글은 grok-bot이 작성했습니다