139 lines
3.3 KiB
TOML
139 lines
3.3 KiB
TOML
[app]
|
|
name = "estimator"
|
|
env = "dev"
|
|
log_level = "INFO"
|
|
|
|
[api]
|
|
host = "0.0.0.0"
|
|
port = 8000
|
|
request_timeout_s = 120
|
|
|
|
[database]
|
|
pool_size = 5
|
|
echo = false
|
|
# dsn comes from env: EST_DATABASE__DSN
|
|
|
|
[llm]
|
|
repair_attempts = 1 # extra calls when JSON fails schema validation
|
|
|
|
[llm.anthropic]
|
|
base_url = "https://api.anthropic.com"
|
|
api_version = "2023-06-01"
|
|
timeout_s = 90
|
|
max_retries = 2
|
|
# api_key comes from env: EST_LLM__ANTHROPIC__API_KEY
|
|
|
|
[llm.openai]
|
|
base_url = "https://api.openai.com/v1"
|
|
timeout_s = 90
|
|
max_retries = 2
|
|
# api_key comes from env: EST_LLM__OPENAI__API_KEY
|
|
|
|
# Each pipeline step picks its own provider and model.
|
|
# temperature is omitted unless set (some reasoning models reject it).
|
|
[llm.steps.clarify]
|
|
provider = "anthropic"
|
|
model = "claude-sonnet-5-5"
|
|
max_tokens = 3000
|
|
|
|
[llm.steps.decompose]
|
|
provider = "anthropic"
|
|
model = "claude-sonnet-5-5"
|
|
max_tokens = 8000
|
|
|
|
[llm.steps.estimate]
|
|
provider = "anthropic"
|
|
model = "claude-sonnet-5-5"
|
|
max_tokens = 8000
|
|
|
|
[llm.steps.critic]
|
|
provider = "anthropic"
|
|
model = "claude-sonnet-5-5"
|
|
max_tokens = 6000
|
|
|
|
# Example: critic on another vendor, with the first vendor as fallback.
|
|
# Check the model ID in the provider docs before use.
|
|
# [llm.steps.critic]
|
|
# provider = "openai"
|
|
# model = "gpt-6.1-sol"
|
|
# reasoning_effort = "low"
|
|
# max_tokens = 6000
|
|
# [llm.steps.critic.fallback]
|
|
# provider = "anthropic"
|
|
# model = "claude-sonnet-5-5"
|
|
# max_tokens = 6000
|
|
|
|
[agent]
|
|
prompts_dir = "prompts"
|
|
max_requirements_chars = 20000
|
|
max_questions = 7
|
|
max_tasks = 60
|
|
max_task_hours = 400
|
|
max_critic_new_tasks = 10
|
|
critic_max_change_ratio = 3.0
|
|
reference_k = 5
|
|
|
|
[rag]
|
|
enabled = true
|
|
embedding_model = "text-embedding-3-small"
|
|
top_k = 5
|
|
min_similarity = 0.55
|
|
|
|
[pricing]
|
|
default_region = "ru"
|
|
default_currency = "RUB"
|
|
default_engagement = "fixed_price" # fixed_price | time_and_materials, chosen per estimate in the UI/API
|
|
pm_pct = 0.15
|
|
markup_pct = 0.20 # markup on cost; the implied margin is markup / (1 + markup)
|
|
reserve_floor_pct = 0.10 # minimum reserve; the PERT reserve is used when it is larger
|
|
reserve_z = 1.04 # PERT reserve = reserve_z x sigma of the estimate, not a calibrated quantile
|
|
estimate_unit_hours_per_day = 8
|
|
|
|
[pricing.vat]
|
|
# VAT is shown on top of prices that are calculated without it. Defaults by the client's region:
|
|
# Russian client: 22% (the general rate since 2026, for a seller that charges VAT); EU client: none,
|
|
# services to a foreign client are outside Russian VAT. Override per estimate in the UI or API.
|
|
default_rates = { ru = 0.22, eu = 0.0 }
|
|
choices = [0.22, 0.10, 0.07, 0.05] # other rates offered besides "no VAT"
|
|
|
|
[pricing.min_rounding]
|
|
step = 1000
|
|
|
|
[market]
|
|
active_version = "2026Q4"
|
|
check_tolerance = 0.25
|
|
|
|
[calibration]
|
|
enabled = true
|
|
min_samples = 5
|
|
default_k = 1.2
|
|
|
|
[fx]
|
|
provider = "cbr"
|
|
cache_ttl_s = 3600
|
|
|
|
[mcp]
|
|
enabled = false
|
|
transport = "stdio"
|
|
|
|
[web]
|
|
enabled = false
|
|
api_base_url = "" # empty = call the API inside this process
|
|
session_ttl_s = 28800
|
|
page_size = 20
|
|
poll_interval_s = 2
|
|
workspace = "shared" # shared | per_user
|
|
timezone = "UTC"
|
|
cookie_secure = false # true behind HTTPS
|
|
login_max_attempts = 5
|
|
login_window_s = 300
|
|
# secrets come from env: EST_WEB__SESSION_SECRET, EST_WEB__USERS, EST_WEB__INTERNAL_API_KEY
|
|
|
|
[audit]
|
|
store_prompts = true
|
|
|
|
[jobs]
|
|
max_concurrent = 4
|
|
timeout_s = 300
|
|
shutdown_grace_s = 10
|