-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy path.env.example
More file actions
144 lines (127 loc) · 6.86 KB
/
Copy path.env.example
File metadata and controls
144 lines (127 loc) · 6.86 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
# Main backend setup
# OpenAI / Codex OAuth is the default backend.
# Set MATHCODE_USE_OPENAI=0 to disable it and use an Anthropic backend instead.
# OpenAI / Codex OAuth (default, enabled unless set to 0)
# 1. Run `codex auth login`
# MATHCODE_USE_OPENAI=1
OPENAI_MODEL=gpt-5.6-sol
OPENAI_SMALL_MODEL=gpt-5.6-sol
OPENAI_REASONING_EFFORT=xhigh
# OpenRouter via the OpenAI-compatible Responses API
# Requires MATHCODE_USE_OPENAI=0 and MATHCODE_USE_OPENROUTER=1
# MATHCODE_USE_OPENROUTER=1
# OPENROUTER_API_KEY=sk-or-...
# OPENROUTER_MODEL=openai/gpt-5.6-sol
# OPENROUTER_SMALL_MODEL=openai/gpt-5.6-sol
# OPENROUTER_REASONING_EFFORT=xhigh
# OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
# Optional attribution headers:
# OPENROUTER_HTTP_REFERER=https://your-app.example
# OPENROUTER_APP_TITLE=MathCode
# Optional paper-workflow backend. Atomic Lean tools use the active agent
# route and do not have a separate model or retry controller.
# MATHCODE_PAPER_BACKEND=codex # mock | codex
# MATHCODE_PAPER_MODEL=gpt-5.6-sol
# MATHCODE_PAPER_REASONING_EFFORT=xhigh
# MATHCODE_PAPER_CODEX_SANDBOX=workspace-write
# MATHCODE_PAPER_FORMALIZE_BACKEND=codex
# MATHCODE_PAPER_FORMALIZE_AGENT_TIMEOUT_S=3600
# MATHCODE_PAPER_PROVE_BACKEND=codex
# MATHCODE_PAPER_PROVE_AGENT_TIMEOUT_S=3600
# MATHCODE_PAPER_BRIDGER=codex
# To use the Anthropic API instead of Codex:
# 1. Set MATHCODE_USE_OPENAI=0
# 2. Set ANTHROPIC_API_KEY
# MATHCODE_USE_OPENAI=0
# ANTHROPIC_API_KEY=sk-ant-...
# ANTHROPIC_MODEL=claude-sonnet-4-5
# Prefix-cache request-shape diagnostics and policy controls.
# MathCode does not emit model-visible prompt-header attribution for any
# provider route. Provider-native cache fields remain governed by cache policy.
# MATHCODE_DISABLE_CACHE_STABLE_PROMPTS=1
# MATHCODE_DISABLE_CACHE_POLICY=1
# MATHCODE_CACHE_MULTI_BREAKPOINT=1
# MATHCODE_CACHE_EXPLICIT_MIN_PREFIX_GATE=1
# MATHCODE_CACHE_TTL_IDLE_AWARE=1
# MATHCODE_CACHE_TTL_IDLE_THRESHOLD_MS=300000
# MATHCODE_DISABLE_TOOL_CANONICALIZATION=1
# MATHCODE_DISABLE_BETA_CANONICALIZATION=1
# AWS Bedrock
# Requires MATHCODE_USE_OPENAI=0 and MATHCODE_USE_BEDROCK=1
# MATHCODE_USE_BEDROCK=1
# AWS_REGION=us-east-1
# ANTHROPIC_MODEL=anthropic.claude-sonnet-4-5-20250929-v1:0
# Google Vertex AI
# Requires MATHCODE_USE_OPENAI=0 and MATHCODE_USE_VERTEX=1
# MATHCODE_USE_VERTEX=1
# ANTHROPIC_VERTEX_PROJECT_ID=your-gcp-project
# CLOUD_ML_REGION=us-east5
# ANTHROPIC_MODEL=claude-sonnet-4-5@20250929
# Azure Foundry
# Requires MATHCODE_USE_OPENAI=0 and MATHCODE_USE_FOUNDRY=1
# MATHCODE_USE_FOUNDRY=1
# ANTHROPIC_FOUNDRY_RESOURCE=your-foundry-resource
# ANTHROPIC_MODEL=claude-sonnet-4-5
# MiniMax gateway (Anthropic-compatible)
# Requires MATHCODE_USE_OPENAI=0
# MINIMAX=your_minimax_token
# ANTHROPIC_BASE_URL=https://api.minimaxi.com/anthropic
# ANTHROPIC_MODEL=MiniMax-M3
# ANTHROPIC_DEFAULT_SONNET_MODEL=MiniMax-M3
# ANTHROPIC_DEFAULT_HAIKU_MODEL=MiniMax-M3
# ANTHROPIC_DEFAULT_OPUS_MODEL=MiniMax-M3
# Note: MINIMAX is auto-mapped to ANTHROPIC_AUTH_TOKEN at startup.
# Important for release bundles:
# - `./run` sources the bundle `.env` before launching MathCode.
# - Interactive `/webui` slash-command launches preserve their selected
# MATHCODE_WEBUI_PORT and MATHCODE_WEBUI_WORKSPACE over same-named `.env` keys.
# Bundled math tooling defaults to the repo-local Lean workspace.
# Leave these unset unless you explicitly want to override them.
# LEAN_PROJECT_DIR=/absolute/path/to/lean-workspace
# Lean capability tuning (optional).
# MATHCODE_MAX_PARALLEL_COMPILES=2 # Shared Lean compile cap (clamped to 1-8)
# MATHCODE_GOAL_MAX_TOKEN_BUDGET=1000000000 # Source/WebUI goal token-budget ceiling (also accepts integer-valued decimals and k/m/b suffixes)
# MATHCODE_MAX_CHAINED_COMMAND_INPUTS=25 # Nested local slash-command next-input ceiling
# MATHCODE_WEBUI_LAUNCHER_BIN=/absolute/path/to/mathcode-webui # Optional /webui launcher helper override
# Kimina Lean Server — external long-lived Lean compiler service (see
# https://github.com/project-numina/kimina-lean-server). When enabled,
# mathcode spawns the server as a subprocess at startup and keeps it alive
# until mathcode exits. LeanGoal and LeanCheck may reuse it for non-certifying
# feedback only when MATHCODE_KIMINA_PROJECT_ROOT exactly matches their resolved
# project and a live version guard confirms the project's declared Lean version.
# Startup, compatibility, or transport failure falls back to a pinned
# subprocess with a model-visible warning. Isolated paper agents and LeanVerify
# never use Kimina. MathCode launches the service in a fail-closed OS sandbox,
# binds it to loopback with a random bearer key that never enters the Lean REPL
# environment, removes provider credentials, and permits writes only in private
# scratch. Startup and requests share the global Lean concurrency cap. The
# persistent service is macOS-only; other platforms keep using pinned
# subprocesses. Supported setsid Lake launches pass through a read-only
# owner-pipe guardian that strips both Kimina key names before Lake starts, so
# parent exit cannot orphan a REPL group. Current Kimina `/api/check` receives
# the declared project directly; legacy `/verify` is eligible only
# when PROJECT_ROOT is CWD/mathlib4. Current-request cancellation preserves the
# server; legacy cancellation or uncertain backend/transport state restarts it.
# MATHCODE_KIMINA_SERVER=1
# MATHCODE_KIMINA_CMD="/absolute/path/to/kimina-lean-server/.venv/bin/python -m server" # required; start directly with Python; any venv must live below CWD
# MATHCODE_KIMINA_CWD=/absolute/path/to/kimina-lean-server # required cwd for the start command
# MATHCODE_KIMINA_PROJECT_ROOT=/absolute/path/to/lean-project # exact project served; required for LeanGoal/LeanCheck
# MATHCODE_KIMINA_PORT=12332 # MathCode compatibility default; exported to current and legacy Kimina env names
# MATHCODE_KIMINA_STARTUP_TIMEOUT_S=300 # server readiness and one-time Mathlib warmup budget
# Optional Lean LSP / REPL feedback for capability helpers.
# MATHCODE_USE_LSP=1
# The vault namespace is derived from `basename(MATHCODE_OBSIDIAN_VAULT)`.
# `/theorem-store sync|check|status` performs explicit library actions.
# MATHCODE_VAULT_NAME=MyCustomNamespace # Optional explicit namespace override
# Declaration library — /axiomatize stores persistent, compile-checked
# Lean declarations per-vault. Supports axiom (assumptions), def
# (computable), structure, inductive, abbrev. All domains: math,
# physics, chemistry, narrative, general. Use `/axiomatize` to manage
# declarations explicitly. Atomic Lean tools never inject or store axioms.
# Persistent Lean REPL for eligible generic `compileFile` consumers. Atomic
# Lean tools do not use this in-process cache: LeanGoal/LeanCheck may use the
# explicitly configured Kimina server above, while LeanVerify remains fresh.
# MATHCODE_LEAN_REPL=1
API_TIMEOUT_MS=3000000
MATHCODE_DISABLE_NONESSENTIAL_TRAFFIC=1
DISABLE_TELEMETRY=1