forked from dwgx/WindsurfAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
98 lines (90 loc) · 4.84 KB
/
Copy path.env.example
File metadata and controls
98 lines (90 loc) · 4.84 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# ========== Server ==========
PORT=3003
# API key for incoming requests (leave empty for open access)
API_KEY=
# Directory for persisted JSON state and logs (Docker 推荐用 /data)
DATA_DIR=
# ========== Codeium Auth ==========
# Option 1: Direct API key from Windsurf
CODEIUM_API_KEY=
# Option 2: Token from windsurf.com/show-auth-token
CODEIUM_AUTH_TOKEN=
# ========== Language Server ==========
# Path to the language server binary.
# Linux x64 default: /opt/windsurf/language_server_linux_x64
# Linux arm64 default: /opt/windsurf/language_server_linux_arm
# macOS Apple Silicon default: ~/.windsurf/language_server_macos_arm
# macOS Intel default: ~/.windsurf/language_server_macos_x64
LS_BINARY_PATH=/opt/windsurf/language_server_linux_x64
# Per-proxy language server data root.
# macOS local runs should use a user-writable directory, e.g. ~/.windsurf/data.
LS_DATA_DIR=/opt/windsurf/data
# gRPC port for language server
LS_PORT=42100
# ========== Dashboard ==========
# Dashboard password — protects /dashboard and all /dashboard/api/* endpoints.
# If empty AND API_KEY is also empty, dashboard is completely open (anyone can
# view accounts, API keys, logs, and trigger updates). Set this for any
# internet-facing deployment.
DASHBOARD_PASSWORD=
# ========== Advanced ==========
CODEIUM_API_URL=https://server.self-serve.windsurf.com
DEFAULT_MODEL=claude-4.5-sonnet-thinking
MAX_TOKENS=8192
LOG_LEVEL=info
# ========== Security ==========
# Allow private/internal hosts (e.g., 192.168.x.x, 10.x.x.x, localhost) in proxy tests.
# Set to 1 for local deployments where you need to test proxies on private networks.
# Leave empty or set to 0 for public-facing deployments (default: only public hosts allowed).
ALLOW_PRIVATE_PROXY_HOSTS=
# ========== Devin Sessions provider (optional) ==========
# Wraps Cognition's official Devin REST API (https://docs.devin.ai/api-reference/overview)
# as an OpenAI-compatible /v1/chat/completions endpoint. Independent of the
# Windsurf account pool — uses YOUR Devin API key and bills against your Devin
# org ACU budget. Leave blank to disable; when blank the `devin*` model entries
# are hidden from /v1/models.
#
# Service-user keys start with `apk_` (legacy v1) or `cog_` (current v3).
# Personal access tokens start with `apk_user_` (v3 only).
DEVIN_API_KEY=
# Override only if you're on Devin Enterprise with a custom host.
DEVIN_API_BASE=https://api.devin.ai
# Which Devin API surface this proxy targets for /v1/chat/completions:
# auto — try /v1/sessions; if Devin returns 401/403 and DEVIN_ORG_ID is set,
# fall back to /v3/organizations/<org>/sessions and cache the choice.
# v1 — always use the legacy /v1/sessions endpoints (apk_* keys).
# v3 — always use /v3/organizations/<org>/sessions (cog_* / apk_user_* keys).
# The /v1/devin/* REST passthrough is unaffected — it routes by path prefix.
DEVIN_API_VERSION=auto
# Required when DEVIN_API_VERSION=v3 (or when auto-detect falls back to v3).
# Service-user tokens are scoped to a single org; the org_id must be baked
# into v3 URLs because the upstream doesn't infer it from the bearer. Find
# it at https://app.devin.ai/settings/team. Format: org-<32 hex chars>.
DEVIN_ORG_ID=
# Optional defaults applied to every Devin session created by this proxy.
# Per-request overrides via OpenAI body.metadata.devin_snapshot_id / devin_playbook_id.
DEVIN_DEFAULT_SNAPSHOT_ID=
DEVIN_DEFAULT_PLAYBOOK_ID=
# Poll cadence + wall-clock cap for the synchronous /v1/chat/completions wrapper.
# Devin sessions are async tasks; this proxy polls until status_enum reaches
# blocked|finished|expired, or DEVIN_MAX_WAIT_MS elapses (returns finish_reason=length).
DEVIN_POLL_INTERVAL_MS=2000
DEVIN_MAX_WAIT_MS=600000
# In-process session reuse cache: maps conversation-history fingerprints to
# Devin session_ids so multi-turn OpenAI clients land on the same long-running
# session. X-Devin-Session-Id request header always overrides.
DEVIN_SESSION_CACHE_TTL_MS=3600000
DEVIN_SESSION_CACHE_MAX_ENTRIES=1000
# ========== Devin Cloud REST passthrough (/v1/devin/*) ==========
# Mounted automatically when DEVIN_API_KEY is set. Lets clients reuse this
# proxy to drive Devin's full toolchain without ever holding the Devin key:
# /v1/devin/sessions v1 sessions (legacy)
# /v1/devin/attachments v1 attachments (upload)
# /v1/devin/knowledge | /playbooks | /secrets v1 org resources
# /v1/devin/v3/organizations/<org_id>/... v3 current API (RBAC)
# /v1/devin/v3/enterprise/... v3 enterprise admin
# /v1/devin/v2/enterprise/... v2 legacy enterprise (audit,
# consumption, api-keys,
# members, organizations)
# See docs/devin-provider.md for the full route table. Routes not in the
# allowlist return 404 even when DEVIN_API_KEY is configured.