-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
70 lines (61 loc) · 1.88 KB
/
config.example.yaml
File metadata and controls
70 lines (61 loc) · 1.88 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
server:
listen: ":8080"
network:
# Optional outbound proxy for OAuth and upstream requests.
# Must be an absolute URL with host.
# Supported schemes: http, https, socks5, socks5h.
# Example: http://127.0.0.1:7890 or socks5h://127.0.0.1:1080.
# Empty or unset means no explicit proxy.
proxy_url: ""
# Example:
# proxy_url: "http://127.0.0.1:7890"
auth:
# Fixed API key used by downstream clients when calling this gateway.
downstream_api_key: "replace-with-your-fixed-key"
logging:
# Log level: debug, info, warn, error
level: "info"
# Log format: text, json
format: "text"
# Log output: stdout, file, both
output: "both"
# Log color mode for text format: auto, always, never
color: "always"
file:
# Empty means <workdir>/logs
dir: ""
name: "codex-gateway.log"
max_size_mb: 100
max_backups: 10
max_age_days: 7
compress: false
oauth:
# Callback mode defaults are already set for Codex OAuth.
# You can keep this block as-is unless you need custom endpoints.
client_id: "app_EMoamEEZ73f0CkXaXp7hrann"
client_secret: ""
authorize_endpoint: "https://auth.openai.com/oauth/authorize"
token_endpoint: "https://auth.openai.com/oauth/token"
redirect_host: "localhost"
redirect_port: 1455
redirect_path: "/auth/callback"
originator: "opencode"
scopes:
- "openid"
- "profile"
- "email"
- "offline_access"
audience: ""
upstream:
# codex_oauth (default): use ChatGPT Codex backend with OAuth token
# openai_api: use upstream base_url directly as traditional OpenAI API proxy
mode: "codex_oauth"
# Used when mode=openai_api
base_url: "https://api.openai.com"
# Used when mode=codex_oauth
codex_base_url: "https://chatgpt.com"
codex_responses_path: "/backend-api/codex/responses"
models_path: "/v1/models"
chat_completions_path: "/v1/chat/completions"
responses_path: "/v1/responses"
timeout_seconds: 60