Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
215 lines (187 loc) · 10.8 KB
/
Copy path.env.example
File metadata and controls
215 lines (187 loc) · 10.8 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# Copy this file to .env. Sign-in is done by hand in a browser window
# (run `python -m deepseek.auth` or `python -m qwen.auth`), so no credentials are stored here.
# All providers are opt-in. DeepSeek web automation may restrict your account.
# --- Common ---
# Default listen address is 127.0.0.1 (local services only).
# Use 0.0.0.0 for access from the network or Docker containers.
# HOST=0.0.0.0
# PORT=8000
# Transports (how a provider answers requests):
# browser — signed-in site tab + userscripts; model id is <provider>-web; the
# model is chosen in the site UI. Needs BROWSER_BRIDGE_ENABLED=1, a
# paired tab, and browser/README.md. Used by Grok, Mistral, GLM,
# ChatGPT/Claude (browser only); Qwen/Gemini/Kimi when *_TRANSPORT=browser.
# http — direct website API after a manual auth CLI (no tab during requests).
# Qwen default; optional for Kimi. DeepSeek has no *_TRANSPORT flag
# and always uses this style after `python -m deepseek.auth`.
# cli — Gemini default: official Antigravity CLI (`agy`) + GEMINI_MODELS.
# Enable a provider with <PROVIDER>_ENABLED=1. Dual-transport providers set
# <PROVIDER>_TRANSPORT (qwen: http|browser, gemini: cli|browser, kimi: browser|http).
# Shared signed-in browser tab bridge via a userscript browser extension:
# Tampermonkey for Chrome, Violentmonkey for Chrome, or Userscripts for Safari.
# Read browser/README.md before enabling. Required by browser transports
# (Qwen, Gemini, Grok, Mistral, GLM, ChatGPT, Claude, Kimi).
BROWSER_BRIDGE_ENABLED=0
# Provider error blocking (default 1). When 1, durable pause and unresolved
# pending attempts block future requests until `python -m providers.access resume <provider>`.
# When 0, stored provider pauses/pending blocks are ignored and new failures are
# not latched; this does not disable provider quotas, local budgets, or chat-history
# consistency checks, and may retry uncertain requests / duplicate provider work.
PROVIDER_ACCESS_PAUSE=1
# How long to wait for one provider answer, in seconds (1–18000). Default 600.
# Used by browser tabs, Kimi HTTP and Gemini CLI (after a browser stream starts,
# the same budget applies).
# PROVIDER_RESPONSE_TIMEOUT=18000
# Minimum seconds between starts of attempts/continuations (durable across processes).
# This is pacing, not a guarantee of acceptable use or website quota.
PROVIDER_MIN_INTERVAL=30
# Accepted replies per saved stateless conversation (DeepSeek + web providers,
# including Qwen browser); integer 1..1000. Raising preserves existing history
# and one-use continuation protection.
CONVERSATION_MAX_REPLIES=20
# Repeated initial prompts with exactly identical history produce the same cache key.
# The bridge does not open a new provider chat while a matching link is retained; it may
# reuse that link if still unused, or reject the repeat when already consumed.
# On startup, optionally delete closed/consumed links so a repeated initial prompt
# can start a new chat: 0 (default) keeps them; 1 deletes rows with used=1 only;
# unused links (used=0) remain. The same prompt may then create a new upstream chat,
# and its later continuation may bind to the wrong chat and fail.
# For a complete manual cleanup of all chat-cache tables, run:
# python -m server.conversation_admin -clear
CONVERSATION_CLEAR_USED_ON_STARTUP=0
# Opt-in: one automatic context migration per failed request, in the SAME
# Harness goal. Only an empty, explicitly cleared context refusal qualifies.
# Private checkpoints in session/context-checkpoints; no counter reset/replay.
# Existing paused requests need separate recovery and are not auto-resumed.
# Also migrate before dispatch when CONVERSATION_MAX_REPLIES is reached.
DEEPSEEK_CONTEXT_ROLLOVER=0
# RATE_LIMIT_PER_MINUTE=30 # per-client-IP limit on /v1 endpoints
# --- TOOL / TOOLCALL ---
# Optional raw per-chat traces (prompts, tool calls/results and replies) in ./llog/.
# Files can contain private project data. Disabled by default.
TOOLCALL_LOG=0
# How OpenAI `tools` are flattened into the provider prompt.
# full — full JSON Schema + tool_calls rules on every turn.
# light — recommended; full block on the first turn of a provider chat; short
# name/format reminder on continuations (smaller follow-ups).
# medium — like light, but the continuation reminder also lists each tool's
# argument shape (field names, nesting, `?` optional; no descriptions), so
# a model does not guess arguments from memory. Longer follow-up prompts.
# none — like light on the first turn; no tools block on continuations.
# HTTP transports (DeepSeek, Qwen API, Kimi direct, Gemini CLI): default full.
# Browser tab bridge (grok/mistral/glm/chatgpt/claude/kimi/qwen/gemini): default light.
TOOL_INSTRUCTIONS_HTTP=full
TOOL_INSTRUCTIONS_BROWSER=light
# Requested tool envelope for DeepSeek only: json (default) or dsml (opt-in).
# DSML avoids JSON-escaped shell/file strings; the same complete-batch/schema
# checks apply. This never changes history or authorizes repair/replay.
DEEPSEEK_TOOL_PROTOCOL=json
# Opt-in DeepThink for DeepSeek tool requests that omit thinking. Explicit
# thinking=false still wins. Restart the bridge; no retries or history reset.
DEEPSEEK_TOOL_THINKING=0
# Provider output limit can cut a tool call off mid-JSON. Continuations are off
# by default. An opt-in (>0) continues only when the whole reply starts with an
# open tool_calls fence. Never continues a normal stop that merely omitted a
# Markdown fence.
TOOLCALL_MAX_CONTINUATIONS=0
# Optional: one format correction after a normally completed erroneous tool reply.
# DeepSeek only. Default off.
TOOLCALL_FORMAT_REPAIR=0
# Dump the raw model reply to the log whenever a tool call can't be parsed.
# TOOLCALL_DEBUG=1
# Save the last invalid tool reply privately under session/, without a history request.
# May contain private source or secrets; disabled by default. Do not publish the file.
# Also keeps exact DeepSeek reply ID + request hash for private recovery review.
# With DEEPSEEK_STREAM_DIAGNOSTICS=1, failed tool replies retain the original
# Maximum retained raw captures per directory (1..32, default 4). Never evicts.
DEEPSEEK_STREAM_CAPTURE_FILES=4
# response stream in session/failed-tool-streams/ (4 bounded files, no eviction).
# TOOLCALL_DIAGNOSTICS=1
# --- DeepSeek ---
DEEPSEEK_ENABLED=0
# TRANSPORT
# http only after `python -m deepseek.auth` (no DEEPSEEK_TRANSPORT).
# DeepSeek also spaces HTTP dispatches by up to 3 seconds and enforces durable
# default rolling budgets: 12 generations/hour, 60/day; 3 new chats/hour, 6/day;
# 40 HTTP requests/hour, 200/day. These are local ceilings, not safe quotas.
# Configurable DeepSeek ceilings. Integers 1..2000; day >= hour for each kind.
# Restart to apply. Existing usage is preserved; website quotas are independent.
DEEPSEEK_MAX_GENERATIONS_PER_HOUR=12
DEEPSEEK_MAX_GENERATIONS_PER_DAY=60
DEEPSEEK_MAX_CHATS_PER_HOUR=3
DEEPSEEK_MAX_CHATS_PER_DAY=6
DEEPSEEK_MAX_HTTP_PER_HOUR=40
DEEPSEEK_MAX_HTTP_PER_DAY=200
# DEEPSEEK_PROFILE_DIR=session/profile # reuse an existing signed-in Chrome profile
# Private failed SSE bytes (may contain private source/response text):
# up to 4 files, 8 MiB decoded bytes each; no automatic deletion or replay.
# DEEPSEEK_STREAM_DIAGNOSTICS=1
# --- Qwen ---
QWEN_ENABLED=0
# TRANSPORT
# http — `python -m qwen.auth` + QWEN_MODELS (default).
# browser — model qwen-web; needs BROWSER_BRIDGE_ENABLED=1 and a paired tab.
QWEN_TRANSPORT=http
# Public OpenAI id → website wire model (HTTP transport). Default if unset:
# qwen3.8-omni-flash, qwen3.8-max, qwen3.7-plus.
QWEN_MODELS={"qwen3.8-omni-flash":"qwen3.8-omni-flash","qwen3.8-max":"qwen3.8-max","qwen3.7-plus":"qwen3.7-plus"}
# Optional HTTP-only: renew a locally expired access token once via the website
# refresh cookie. No browser/background work, no replay after refusal; failures
# persist a pause. Ignored for browser transport. See docs/HARNESS.en.md.
QWEN_RENEW_SESSION=0
# QWEN_PROFILE_DIR=/absolute/path/to/a/dedicated/qwen/profile
# --- Gemini ---
GEMINI_ENABLED=0
# TRANSPORT
# cli — sign in with `agy`; put slugs from `agy models` into GEMINI_MODELS (default).
# browser — gemini-web on AI Mode (google.com/search?udm=50) or gemini.google.com/app.
GEMINI_TRANSPORT=cli
# Example catalog current as of 2026-10-11, from `agy models` (account/region may differ).
# GEMINI_MODELS={"gemini-3.8-flash-high":"gemini-3.8-flash-high","gemini-3.8-flash-medium":"gemini-3.8-flash-medium","gemini-3.8-flash-low":"gemini-3.8-flash-low","gemini-3.7-flash-high":"gemini-3.7-flash-high","gemini-3.7-flash-medium":"gemini-3.7-flash-medium","gemini-3.7-flash-low":"gemini-3.7-flash-low","gemini-3.6-flash-high":"gemini-3.6-flash-high","gemini-3.6-flash-medium":"gemini-3.6-flash-medium","gemini-3.6-flash-low":"gemini-3.6-flash-low","gemini-3.1-pro-high":"gemini-3.1-pro-high","gemini-3.1-pro-low":"gemini-3.1-pro-low","gemini-claude-sonnet-4-6":"claude-sonnet-4-6","gemini-claude-opus-4-6-thinking":"claude-opus-4-6-thinking","gemini-gpt-oss-120b-medium":"gpt-oss-120b-medium"}
# ANTIGRAVITY_BIN=agy
# For a broken IPv6 socket only, providers.antigravity_ipv4 wraps the official
# CLI using IPv4 on your existing route, without changing system/VPN settings.
# --- Grok ---
GROK_ENABLED=0
# TRANSPORT
# browser only (no GROK_TRANSPORT). Model: grok-web.
# Needs BROWSER_BRIDGE_ENABLED=1 and a paired tab on grok.com.
# --- Mistral ---
MISTRAL_ENABLED=0
# TRANSPORT
# browser only (no MISTRAL_TRANSPORT). Model: mistral-web.
# Needs BROWSER_BRIDGE_ENABLED=1 and a paired tab on chat.mistral.ai.
# --- GLM ---
GLM_ENABLED=0
# TRANSPORT
# browser only (no GLM_TRANSPORT). Model: glm-web.
# Needs BROWSER_BRIDGE_ENABLED=1 and a paired tab on chat.z.ai.
# --- ChatGPT ---
CHATGPT_ENABLED=0
# TRANSPORT
# browser only (no CHATGPT_TRANSPORT). Model: chatgpt-web.
# Needs BROWSER_BRIDGE_ENABLED=1 and a paired tab on chatgpt.com.
# --- Claude ---
CLAUDE_ENABLED=0
# TRANSPORT
# browser only (no CLAUDE_TRANSPORT). Model: claude-web.
# Needs BROWSER_BRIDGE_ENABLED=1 and a paired signed-in tab on https://claude.ai/;
# select the model in the site UI.
# --- Kimi ---
KIMI_ENABLED=0
# TRANSPORT
# browser — kimi-web (default); large pastes ~4KB+ may become a TXT attachment —
# keep prompts shorter, or use http. Needs BROWSER_BRIDGE_ENABLED=1.
# http — Instant after manual session capture; browser still needed once for
# capture. See docs/KIMI.md. Renewal never follows a refusal.
KIMI_TRANSPORT=browser
KIMI_RENEW_SESSION=0
# --- /v1 API access (required) ---
# Every /v1 request needs Authorization: Bearer <token from session/api-token>.
# python -m server.api_auth path prints the file path (never the token).
# BRIDGE_API_TOKEN_FILE=/absolute/path/to/api-token
# Temporary migration only: admit tokenless loopback, non-browser requests.
# API_AUTH=legacy-loopback
# Non-loopback HOST is refused unless explicitly allowed (token mode only):
# API_ALLOW_PUBLIC_BIND=1
# API_ALLOWED_HOSTS=bridge.lan