- SheetExtractorAgent accepts top-level array responses as the objects array instead of discarding them (recovered the failure mode behind 16/38 failed sheets on job 475a6f184dd1) - Second-chance compact retry per page before declaring extraction failed - call_json: reasoning_effort param (cloud-only extra_body), finish_reason capture + explicit max_tokens log line, finish_reason in raw dumps, cache key covers reasoning_effort - EXTRACT_MAX_TOKENS default 16384 -> 32768 (Gemini thinking tokens count against the cap); new EXTRACT_REASONING_EFFORT=low default for extract - tests: 5 new fallback-ladder tests
72 lines
2.2 KiB
Bash
72 lines
2.2 KiB
Bash
# Copy to backend/.env and fill in your OpenRouter key.
|
|
|
|
AI_BASE_URL=https://openrouter.ai/api/v1
|
|
AI_API_KEY=sk-or-...
|
|
MODEL=google/gemini-2.5-pro
|
|
|
|
# Optional Agent-mode OpenRouter model overrides (inherit MODEL/TEXT_MODEL when blank)
|
|
AGENT_EXTRACT_MODEL=
|
|
AGENT_INDEX_MODEL=
|
|
AGENT_JURISDICTION_MODEL=
|
|
AGENT_LINKER_MODEL=
|
|
AGENT_CONFLICT_MODEL=
|
|
AGENT_CODE_MODEL=
|
|
AGENT_CONSTRUCT_MODEL=
|
|
AGENT_COMPLETENESS_MODEL=
|
|
AGENT_BRAIN_MODEL=
|
|
AGENT_RFI_MODEL=
|
|
|
|
# Agent-mode hard scope limits / concurrency
|
|
AGENT_LINK_MAX_ASSERTIONS=60
|
|
AGENT_CLUSTER_MAX_ASSERTIONS=24
|
|
AGENT_CONFLICT_MAX_IMAGES=6
|
|
AGENT_CODE_BATCH_SIZE=60
|
|
AGENT_BRAIN_MAX_TOKENS=16384
|
|
AGENT_LINK_CONCURRENCY=4
|
|
AGENT_CONFLICT_CONCURRENCY=4
|
|
AGENT_SPECIALIST_CONCURRENCY=4
|
|
AGENT_RFI_CONCURRENCY=4
|
|
|
|
# Agent-mode human-review gate (pipeline stops after Brain until a human reviews)
|
|
AGENT_REQUIRE_REVIEW=true
|
|
# Max clean clusters added to the review queue as non-blocking spot-checks
|
|
AGENT_REVIEW_AUDIT_SAMPLE=5
|
|
# Allow future cross-job review-feedback aggregation to include source_text/images/comments
|
|
REVIEW_AGGREGATE_INCLUDE_TEXT=false
|
|
|
|
# Pipeline tuning
|
|
PDF_DPI=100
|
|
MAX_PAGES=60
|
|
MAX_DIMENSION=2400
|
|
LLM_TIMEOUT=180
|
|
EXTRACT_MAX_TOKENS=32768
|
|
# Reasoning effort for per-sheet extraction (low keeps Gemini thinking tokens
|
|
# from eating the output budget). Blank = don't send the parameter.
|
|
EXTRACT_REASONING_EFFORT=low
|
|
REASON_MAX_TOKENS=4096
|
|
EXTRACT_CONCURRENCY=4
|
|
REASON_CONCURRENCY=4
|
|
|
|
# Public URL users reach this server on (used for the link in result emails)
|
|
APP_BASE_URL=https://conchecker.scoutitsystems.com
|
|
# APP_BUILD is set by CI at image build time (sha-<short_sha>) - do not set manually.
|
|
|
|
# LLM observability (job-log verbosity + raw request/response dumps)
|
|
# LLM_VERBOSE: one line per LLM call in job.log (model, sizes, item counts, cost)
|
|
# LLM_RAW_DUMP: full prompt+response per call in outputs/<job_id>/llm_raw/
|
|
# (base64 images excluded). Both default on; set false to quiet down.
|
|
LLM_VERBOSE=true
|
|
LLM_RAW_DUMP=true
|
|
|
|
# Email notifications (optional). Leave SMTP_HOST blank to disable.
|
|
# Examples:
|
|
# Gmail: SMTP_HOST=smtp.gmail.com SMTP_PORT=587 (use an App Password)
|
|
# M365: SMTP_HOST=smtp.office365.com SMTP_PORT=587
|
|
SMTP_HOST=
|
|
SMTP_PORT=587
|
|
SMTP_USER=
|
|
SMTP_PASSWORD=
|
|
SMTP_FROM=
|
|
SMTP_USE_TLS=true
|
|
SMTP_USE_SSL=false
|