Files
soma/soma.env.example
T

85 lines
3.6 KiB
Bash
Raw Normal View History

2026-08-24 08:10:26 -07:00
# Soma listener
# Keep Soma loopback-only unless a trusted reverse proxy supplies access control,
# rate limits, request-size limits, and TLS.
PROXY_HOST=127.0.0.1
PROXY_PORT=8080
# Removed in 2.4.0. Clear a value inherited from a shell that previously sourced a
# 2.3.x profile; Soma rejects even TRANSFORM_CONFIRM_REWRITES=false.
unset TRANSFORM_CONFIRM_REWRITES
# Target model endpoint
TARGET_URL=https://opencode.ai/zen/v1
TARGET_KEY=
TARGET_HEADERS_JSON={}
# Primary classifier, first repair candidate, and integrity verifier. The primary
# reasoning-off route is the fast deterministic path.
TRANSFORM_URL=http://127.0.0.1:8001/v1
TRANSFORM_KEY=
TRANSFORM_MODEL=local
TRANSFORM_HEADERS_JSON={}
TRANSFORM_REASONING_MODE=off
TRANSFORM_MEDIA_MODE=placeholder
# Required semantic-repair route when a secondary is configured: use the same
# already-running model with
# reasoning enabled, or configure an independently operated endpoint/model. Soma
# sends fresh candidates from the original context; it never sends rejected output.
TRANSFORM_SECONDARY_URL=http://127.0.0.1:8001/v1
TRANSFORM_SECONDARY_KEY=
TRANSFORM_SECONDARY_MODEL=local
TRANSFORM_SECONDARY_HEADERS_JSON={}
TRANSFORM_SECONDARY_REASONING_MODE=on
TRANSFORM_SECONDARY_MEDIA_MODE=placeholder
# Optional target-specific reasoning overlay
ENABLE_REASONING={}
# ENABLE_REASONING={"thinking":{"type":"enabled"}}
# Qualification uses zero to remove intentional sampling variance from repeat gates.
# Any nonzero value is a different profile and requires a new report.
TRANSFORM_TEMPERATURE=0
# Full transform task-context and individual target-field limits. Inputs are rejected,
# never silently truncated. TRANSFORM_FIELD_MAX_CHARS must not exceed the context cap.
TRANSFORM_CONTEXT_MAX_CHARS=131072
TRANSFORM_FIELD_MAX_CHARS=32768
# Decision/verifier and joint-repair output budgets.
TRANSFORM_DECISION_MAX_TOKENS=1536
TRANSFORM_REWRITE_MAX_TOKENS=16384
# A clarification is not accepted as a repaired answer unless explicitly enabled.
TRANSFORM_ALLOW_CLARIFICATION=false
# JSON-constrained transform output is enabled by default.
# Restart Soma after changing this value. Verify configuration before launch with
# `python3 soma.py --check-config`, then inspect the startup log or `/health` to
# confirm the effective value in the running process.
TRANSFORM_JSON_MODE=true
# One fresh target retry is available only when the complete target turn is
# unrepairable and leaves no usable content or native tool call. It is opt-in because
# it adds target latency/cost and can produce another model action.
TARGET_RETRY_ON_UNREPAIRABLE=false
# false: transform failures, including failed integrity checks and exhausted candidates, return 502
# true: preserve usable original refusing text after repair failure; reasoning-only
# or otherwise empty terminal turns still fail
FAIL_OPEN=false
FORWARD_CLIENT_HEADERS=true
# Same-server primary/secondary transform profiles are allowed; this protects only
# against the target sharing an origin with either transform endpoint.
REQUIRE_DISTINCT_ENDPOINTS=true
CONNECT_TIMEOUT=15
REQUEST_TIMEOUT=600
# One aggregate recovery budget after the first target response. It includes every
# transform call and an optional second target call plus processing of its response.
TRANSFORM_TOTAL_TIMEOUT=1200
UPSTREAM_ERROR_BODY_LIMIT=4000
SSE_CHUNK_CHARS=2048
LOG_LEVEL=INFO
# Optional common prefix added to classification, joint-repair, and integrity prompts.
# Leave unset for Soma's built-in 2.4.0 phase-specific transform behavior. A custom
# prefix materially changes the transform profile and requires separate qualification.
# TRANSFORM_PROMPT=...