-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathconfig.example.toml
More file actions
56 lines (50 loc) · 2.25 KB
/
Copy pathconfig.example.toml
File metadata and controls
56 lines (50 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# trae-proxy configuration
# Upstream API address
# 上游服务地址,路径支持完整地址或基地址
# 示例:- 移动云:OpenAI:https://ai.bayesdl.com/api/maas/
# 示例:- 京东云:OpenAI:https://modelservice.jdcloud.com/coding/openai
# 示例:- 京东云:Anthropic:https://modelservice.jdcloud.com/coding/anthropic
# 示例:- sub2api:直接填端点地址
upstream = "http://192.168.48.12:8080"
# Upstream protocol: "anthropic" (default) performs OpenAI → Anthropic Messages
# conversion. "openai" directly forwards OpenAI Chat Completions — use this when
# upstream is OpenAI-compatible (LM Studio, Ollama, most relays).
# 上游服务是Anthropic协议填anthropic,如果是openai兼容填openai
upstream_protocol = "anthropic"
# HTTPS listen address
listen = ":443"
# Domain to hijack via /etc/hosts
hijack = "openrouter.ai"
# When true, GET /v1/models forwards to the real hijack domain (bypassing /etc/hosts)
# instead of returning the fake list from [models] below.
# real_models = false
# Model mapping: request model name → upstream model name
# 3-tier fallback: exact match → strip "anthropic/" prefix → passthrough
# 如果劫持openrouter,模型名称是有"anthropic/"、"openai/"等前缀
# 以下是当前Trae中OpenRouter列出的模型,任选一个将请求模型映射到上游服务提供的真实模型
[models]
# 海外版 Trae 当前展示的最新模型
"anthropic/claude-sonnet-4.6" = "claude-sonnet-4.6"
"anthropic/claude-opus-4.6" = "claude-opus-4.6"
"anthropic/claude-haiku-4.5" = ""
"openai/gpt-oss-120b" = "gpt-5.4"
"openai/gpt-5.4" = ""
"openai/gpt-5.4-mini" = ""
"google/gemini-3.1-pro-preview" = ""
"google/gemini-3.1-flash-lite-preview" = ""
"minimax/minimax-m2.7" = ""
"qwen/qwen3-coder-next" = ""
"z-ai/glm-5" = ""
# 国内版 Trae 仍展示的老模型
"anthropic/claude-sonnet-4.5" = "claude-sonnet-4.6"
"anthropic/claude-opus-4.1" = "claude-opus-4.6"
"anthropic/claude-4-sonnet" = "claude-sonnet-4.6"
"anthropic/claude-4-opus" = "claude-opus-4.6"
"anthropic/claude-3.7-sonnet" = "claude-sonnet-4.6"
"openai/gpt-5" = "gpt-5.4"
"openai/gpt-4.1" = "gpt-5.4-mini"
"openai/gpt-4o" = "gpt-5.4-mini"
"google/gemini-3-pro-preview" = ""
"google/gemini-2.5-pro" = ""
"minimax/minimax-m2" = ""
"qwen/qwen3-coder" = ""