-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
67 lines (57 loc) · 2.46 KB
/
Copy pathconfig.example.yaml
File metadata and controls
67 lines (57 loc) · 2.46 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
host: ""
port: 8317
# Directory to store OAuth tokens
auth-dir: "~/.auth2api"
# API keys for client authentication (clients use these to access this proxy)
api-keys:
- "your-api-key-here"
# Maximum JSON request body size
body-limit: "200mb"
# Upstream request timeouts
timeouts:
messages-ms: 120000 # non-stream /v1/messages timeout
stream-messages-ms: 600000 # stream /v1/messages timeout, suitable for Claude Code long tasks
count-tokens-ms: 30000 # /v1/messages/count_tokens timeout
# Per-request call statistics. Aggregated by:
# - client (sha256(api-key))
# - upstream account (provider + email)
# - api endpoint x model x provider
# Events are appended to <auth-dir>/stats.jsonl and replayed on startup.
# Query the live snapshot via GET /admin/stats (requires API key).
stats:
enabled: true
# Debug logging level:
# off = no extra logs
# errors = upstream/network failure details
# verbose = errors + per-request access logs
debug: "off"
# Request fingerprinting — controls how auth2api mimics Claude Code CLI
# These settings affect the User-Agent, billing header, and fingerprint
cloaking:
# CLI version to impersonate (default: 2.1.88)
# This affects User-Agent and the fingerprint in billing-header
cli-version: "2.1.88"
# Entrypoint for billing attribution (default: cli)
# Claude Code uses: cli, mcp, sdk, etc.
entrypoint: "cli"
# Codex (ChatGPT) provider — protocol-required header strings.
# NOT identity faking; these mirror what the official codex CLI sends.
# The cli-version drives BOTH the User-Agent suffix and the explicit
# `version` HTTP header — the backend version-gates some models on it
# ("requires a newer version of Codex" 400). Bump if you see that error;
# `npm view @openai/codex version` shows the current released version.
codex:
# Full User-Agent string, takes precedence over the components below.
# user-agent: "codex_cli_rs/0.125.0 (macos; arm64)"
originator: "codex_cli_rs"
cli-version: "0.125.0"
# Set only if the upstream begins requiring an OpenAI-Beta header.
# openai-beta: "responses=experimental"
# Cursor provider — experimental, reverse-engineered, and not official.
# Override these only when Cursor changes its internal version gates.
cursor:
client-version: "2.3.41"
client-type: "ide"
# agent-base-url is the legacy alias; both keys point at api2.cursor.sh now.
agent-base-url: "https://api2.cursor.sh"
api-base-url: "https://api2.cursor.sh"